Commit 1642bf82 authored by Doug Ledford's avatar Doug Ledford

[PATCH] more driver updates (aic7xxx)

aic7xxx_linux_host.h:
  Update host template
aic7xxx_linux.c:
  Update to new TCQ scheme
parent 5b7526f3
...@@ -430,8 +430,7 @@ static void ahc_linux_freeze_sim_queue(struct ahc_softc *ahc); ...@@ -430,8 +430,7 @@ static void ahc_linux_freeze_sim_queue(struct ahc_softc *ahc);
static void ahc_linux_release_sim_queue(u_long arg); static void ahc_linux_release_sim_queue(u_long arg);
static int ahc_linux_queue_recovery_cmd(Scsi_Cmnd *cmd, scb_flag flag); static int ahc_linux_queue_recovery_cmd(Scsi_Cmnd *cmd, scb_flag flag);
static void ahc_linux_initialize_scsi_bus(struct ahc_softc *ahc); static void ahc_linux_initialize_scsi_bus(struct ahc_softc *ahc);
static void ahc_linux_select_queue_depth(struct Scsi_Host *host, static int ahc_linux_slave_attach(Scsi_Device *device);
Scsi_Device *scsi_devs);
static void ahc_linux_device_queue_depth(struct ahc_softc *ahc, static void ahc_linux_device_queue_depth(struct ahc_softc *ahc,
Scsi_Device *device); Scsi_Device *device);
static struct ahc_linux_target* ahc_linux_alloc_target(struct ahc_softc*, static struct ahc_linux_target* ahc_linux_alloc_target(struct ahc_softc*,
...@@ -1131,7 +1130,6 @@ ahc_linux_register_host(struct ahc_softc *ahc, Scsi_Host_Template *template) ...@@ -1131,7 +1130,6 @@ ahc_linux_register_host(struct ahc_softc *ahc, Scsi_Host_Template *template)
host->can_queue = AHC_MAX_QUEUE; host->can_queue = AHC_MAX_QUEUE;
host->cmd_per_lun = 2; host->cmd_per_lun = 2;
host->sg_tablesize = AHC_NSEG; host->sg_tablesize = AHC_NSEG;
host->select_queue_depths = ahc_linux_select_queue_depth;
/* XXX No way to communicate the ID for multiple channels */ /* XXX No way to communicate the ID for multiple channels */
host->this_id = ahc->our_id; host->this_id = ahc->our_id;
host->irq = ahc->platform_data->irq; host->irq = ahc->platform_data->irq;
...@@ -1449,25 +1447,17 @@ ahc_platform_abort_scbs(struct ahc_softc *ahc, int target, char channel, ...@@ -1449,25 +1447,17 @@ ahc_platform_abort_scbs(struct ahc_softc *ahc, int target, char channel,
* Sets the queue depth for each SCSI device hanging * Sets the queue depth for each SCSI device hanging
* off the input host adapter. * off the input host adapter.
*/ */
static void static int
ahc_linux_select_queue_depth(struct Scsi_Host * host, ahc_linux_slave_attach(Scsi_Device * device)
Scsi_Device * scsi_devs)
{ {
Scsi_Device *device;
struct ahc_softc *ahc; struct ahc_softc *ahc;
u_long flags; u_long flags;
int scbnum;
ahc = *((struct ahc_softc **)host->hostdata); ahc = *((struct ahc_softc **)device->host->hostdata);
ahc_lock(ahc, &flags); ahc_lock(ahc, &flags);
scbnum = 0;
for (device = scsi_devs; device != NULL; device = device->next) {
if (device->host == host) {
ahc_linux_device_queue_depth(ahc, device); ahc_linux_device_queue_depth(ahc, device);
scbnum += device->queue_depth;
}
}
ahc_unlock(ahc, &flags); ahc_unlock(ahc, &flags);
return 0;
} }
/* /*
...@@ -1512,7 +1502,8 @@ ahc_linux_device_queue_depth(struct ahc_softc *ahc, Scsi_Device * device) ...@@ -1512,7 +1502,8 @@ ahc_linux_device_queue_depth(struct ahc_softc *ahc, Scsi_Device * device)
} }
} }
if (tags != 0) { if (tags != 0) {
device->queue_depth = tags; scsi_adjust_queue_depth(device, MSG_ORDERED_TAG, tags);
/* device->queue_depth = tags; */
ahc_set_tags(ahc, &devinfo, AHC_QUEUE_TAGGED); ahc_set_tags(ahc, &devinfo, AHC_QUEUE_TAGGED);
printf("scsi%d:%c:%d:%d: Tagged Queuing enabled. Depth %d\n", printf("scsi%d:%c:%d:%d: Tagged Queuing enabled. Depth %d\n",
ahc->platform_data->host->host_no, device->channel + 'A', ahc->platform_data->host->host_no, device->channel + 'A',
...@@ -1523,8 +1514,9 @@ ahc_linux_device_queue_depth(struct ahc_softc *ahc, Scsi_Device * device) ...@@ -1523,8 +1514,9 @@ ahc_linux_device_queue_depth(struct ahc_softc *ahc, Scsi_Device * device)
* us at any time even though we can only execute them * us at any time even though we can only execute them
* serially on the controller/device. This should remove * serially on the controller/device. This should remove
* some latency. * some latency.
*/
device->queue_depth = 2; device->queue_depth = 2;
*/
scsi_adjust_queue_depth(device, 0, device->host->cmd_per_lun);
} }
} }
......
...@@ -80,7 +80,7 @@ int ahc_linux_abort(Scsi_Cmnd *); ...@@ -80,7 +80,7 @@ int ahc_linux_abort(Scsi_Cmnd *);
eh_host_reset_handler: NULL, \ eh_host_reset_handler: NULL, \
abort: NULL, \ abort: NULL, \
reset: NULL, \ reset: NULL, \
slave_attach: NULL, \ slave_attach: ahc_linux_slave_attach, \
bios_param: AIC7XXX_BIOSPARAM, \ bios_param: AIC7XXX_BIOSPARAM, \
can_queue: 253, /* max simultaneous cmds */\ can_queue: 253, /* max simultaneous cmds */\
this_id: -1, /* scsi id of host adapter */\ this_id: -1, /* scsi id of host adapter */\
......
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