Commit 9ccb0cb5 authored by Doug Ledford's avatar Doug Ledford

Update for new TCQ scheme

parent ecf2c214
...@@ -1295,10 +1295,6 @@ mptscsih_detect(Scsi_Host_Template *tpnt) ...@@ -1295,10 +1295,6 @@ mptscsih_detect(Scsi_Host_Template *tpnt)
#endif #endif
sh->this_id = this->pfacts[portnum].PortSCSIID; sh->this_id = this->pfacts[portnum].PortSCSIID;
/* OS entry to allow host drivers to force
* a queue depth on a per device basis.
*/
sh->select_queue_depths = mptscsih_select_queue_depths;
/* Required entry. /* Required entry.
*/ */
sh->unique_id = this->id; sh->unique_id = this->id;
...@@ -3668,37 +3664,20 @@ mptscsih_bios_param(Disk * disk, kdev_t dev, int *ip) ...@@ -3668,37 +3664,20 @@ mptscsih_bios_param(Disk * disk, kdev_t dev, int *ip)
* Called once per device the bus scan. Use it to force the queue_depth * Called once per device the bus scan. Use it to force the queue_depth
* member to 1 if a device does not support Q tags. * member to 1 if a device does not support Q tags.
*/ */
void int
mptscsih_select_queue_depths(struct Scsi_Host *sh, Scsi_Device *sdList) mptscsih_slave_attach(Scsi_Device *device)
{ {
struct scsi_device *device;
VirtDevice *pTarget; VirtDevice *pTarget;
MPT_SCSI_HOST *hd;
int ii, max;
for (device = sdList; device != NULL; device = device->next) {
if (device->host != sh)
continue;
hd = (MPT_SCSI_HOST *) sh->hostdata;
if (hd == NULL)
continue;
if (hd->Targets != NULL) {
if (hd->is_spi)
max = MPT_MAX_SCSI_DEVICES;
else
max = MPT_MAX_FC_DEVICES<256 ? MPT_MAX_FC_DEVICES : 255;
for (ii=0; ii < max; ii++) { pTarget = device->hostdata;
pTarget = hd->Targets[ii]; if (!device->tagged_supported ||
if (pTarget && !(pTarget->tflags & MPT_TARGET_FLAGS_Q_YES)) { !(pTarget->tflags & MPT_TARGET_FLAGS_Q_YES)) {
device->queue_depth = 1; scsi_adjust_queue_depth(device, 0, 1);
} } else {
} scsi_adjust_queue_depth(device, MSG_SIMPLE_TAG,
} device->host->can_queue >> 1);
} }
return 0;
} }
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
......
...@@ -206,7 +206,7 @@ struct mptscsih_driver_setup ...@@ -206,7 +206,7 @@ struct mptscsih_driver_setup
#define x_scsi_dev_reset mptscsih_dev_reset #define x_scsi_dev_reset mptscsih_dev_reset
#define x_scsi_host_reset mptscsih_host_reset #define x_scsi_host_reset mptscsih_host_reset
#define x_scsi_bios_param mptscsih_bios_param #define x_scsi_bios_param mptscsih_bios_param
#define x_scsi_select_queue_depths mptscsih_select_queue_depths #define x_scsi_slave_attach mptscsih_slave_attach
#define x_scsi_taskmgmt_bh mptscsih_taskmgmt_bh #define x_scsi_taskmgmt_bh mptscsih_taskmgmt_bh
#define x_scsi_old_abort mptscsih_old_abort #define x_scsi_old_abort mptscsih_old_abort
...@@ -234,7 +234,7 @@ extern int x_scsi_bios_param(Disk *, struct block_device *, int *); ...@@ -234,7 +234,7 @@ extern int x_scsi_bios_param(Disk *, struct block_device *, int *);
#else #else
extern int x_scsi_bios_param(Disk *, kdev_t, int *); extern int x_scsi_bios_param(Disk *, kdev_t, int *);
#endif #endif
extern void x_scsi_select_queue_depths(struct Scsi_Host *, Scsi_Device *); extern int x_scsi_slave_attach(Scsi_Device *);
extern void x_scsi_taskmgmt_bh(void *); extern void x_scsi_taskmgmt_bh(void *);
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0) #if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0)
...@@ -262,6 +262,7 @@ extern void x_scsi_taskmgmt_bh(void *); ...@@ -262,6 +262,7 @@ extern void x_scsi_taskmgmt_bh(void *);
eh_bus_reset_handler: x_scsi_bus_reset, \ eh_bus_reset_handler: x_scsi_bus_reset, \
eh_host_reset_handler: x_scsi_host_reset, \ eh_host_reset_handler: x_scsi_host_reset, \
bios_param: x_scsi_bios_param, \ bios_param: x_scsi_bios_param, \
slave_attach: x_scsi_slave_attach, \
can_queue: MPT_SCSI_CAN_QUEUE, \ can_queue: MPT_SCSI_CAN_QUEUE, \
this_id: -1, \ this_id: -1, \
sg_tablesize: MPT_SCSI_SG_DEPTH, \ sg_tablesize: MPT_SCSI_SG_DEPTH, \
......
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