Commit 4d5d8e2a authored by Jürgen E. Fischer's avatar Jürgen E. Fischer Committed by James Bottomley

[PATCH] aha152x

attached my patch for the aha152x driver.  Tested for pcmcia and not
pcmcia and various devices.

changes in the aha152x driver:
- gather code that is not used by PCMCIA at the end
- move request_region for !PCMCIA case to detection
- migration to new scsi host api (remove legacy code)
- free host scribble before scsi_done
- fix error handling
- one isapnp device added to id_table

and in the pcmcia stub module:
- default to synchronous transfers
- release_region hack removed
- let core module do the scsi host api calls.
parent 53e978e8
This diff is collapsed.
......@@ -2,14 +2,14 @@
#define _AHA152X_H
/*
* $Id: aha152x.h,v 2.5 2002/04/14 11:24:12 fischer Exp $
* $Id: aha152x.h,v 2.7 2004/01/24 11:39:03 fischer Exp $
*/
/* number of queueable commands
(unless we support more than 1 cmd_per_lun this should do) */
#define AHA152X_MAXQUEUE 7
#define AHA152X_REVID "Adaptec 152x SCSI driver; $Revision: 2.5 $"
#define AHA152X_REVID "Adaptec 152x SCSI driver; $Revision: 2.7 $"
/* port addresses */
#define SCSISEQ (HOSTIOPORT0+0x00) /* SCSI sequence control */
......@@ -331,6 +331,7 @@ struct aha152x_setup {
};
struct Scsi_Host *aha152x_probe_one(struct aha152x_setup *);
int aha152x_host_reset(struct scsi_cmnd *);
void aha152x_release(struct Scsi_Host *);
int aha152x_host_reset(Scsi_Cmnd *);
#endif /* _AHA152X_H */
......@@ -78,7 +78,7 @@ static int irq_list[4] = { -1 };
static int host_id = 7;
static int reconnect = 1;
static int parity = 1;
static int synchronous = 0;
static int synchronous = 1;
static int reset_delay = 100;
static int ext_trans = 0;
......@@ -244,9 +244,6 @@ static void aha152x_config_cs(dev_link_t *link)
CS_CHECK(RequestIRQ, pcmcia_request_irq(handle, &link->irq));
CS_CHECK(RequestConfiguration, pcmcia_request_configuration(handle, &link->conf));
/* A bad hack... */
release_region(link->io.BasePort1, link->io.NumPorts1);
/* Set configuration options for the aha152x driver */
memset(&s, 0, sizeof(s));
s.conf = "PCMCIA setup";
......@@ -266,9 +263,6 @@ static void aha152x_config_cs(dev_link_t *link)
goto cs_failed;
}
scsi_add_host(host, NULL); /* XXX handle failure */
scsi_scan_host(host);
sprintf(info->node.dev_name, "scsi%d", host->host_no);
link->dev = &info->node;
info->host = host;
......@@ -286,7 +280,7 @@ static void aha152x_release_cs(dev_link_t *link)
{
scsi_info_t *info = link->priv;
scsi_remove_host(info->host);
aha152x_release(info->host);
link->dev = NULL;
pcmcia_release_configuration(link->handle);
......@@ -294,7 +288,6 @@ static void aha152x_release_cs(dev_link_t *link)
pcmcia_release_irq(link->handle, &link->irq);
link->state &= ~DEV_CONFIG;
scsi_unregister(info->host);
}
static int aha152x_event(event_t event, int priority,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment