aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/aic7xxx/aic7xxx_osm.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/aic7xxx/aic7xxx_osm.c')
-rw-r--r--drivers/scsi/aic7xxx/aic7xxx_osm.c23
1 files changed, 6 insertions, 17 deletions
diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm.c b/drivers/scsi/aic7xxx/aic7xxx_osm.c
index d2c9bf39033d..a6a27d5398dd 100644
--- a/drivers/scsi/aic7xxx/aic7xxx_osm.c
+++ b/drivers/scsi/aic7xxx/aic7xxx_osm.c
@@ -812,6 +812,7 @@ struct scsi_host_template aic7xxx_driver_template = {
812 .slave_configure = ahc_linux_slave_configure, 812 .slave_configure = ahc_linux_slave_configure,
813 .target_alloc = ahc_linux_target_alloc, 813 .target_alloc = ahc_linux_target_alloc,
814 .target_destroy = ahc_linux_target_destroy, 814 .target_destroy = ahc_linux_target_destroy,
815 .use_blk_tags = 1,
815}; 816};
816 817
817/**************************** Tasklet Handler *********************************/ 818/**************************** Tasklet Handler *********************************/
@@ -1334,13 +1335,9 @@ ahc_platform_set_tags(struct ahc_softc *ahc, struct scsi_device *sdev,
1334 } 1335 }
1335 switch ((dev->flags & (AHC_DEV_Q_BASIC|AHC_DEV_Q_TAGGED))) { 1336 switch ((dev->flags & (AHC_DEV_Q_BASIC|AHC_DEV_Q_TAGGED))) {
1336 case AHC_DEV_Q_BASIC: 1337 case AHC_DEV_Q_BASIC:
1337 scsi_set_tag_type(sdev, MSG_SIMPLE_TAG);
1338 scsi_activate_tcq(sdev, dev->openings + dev->active);
1339 break;
1340 case AHC_DEV_Q_TAGGED: 1338 case AHC_DEV_Q_TAGGED:
1341 scsi_set_tag_type(sdev, MSG_ORDERED_TAG); 1339 scsi_adjust_queue_depth(sdev,
1342 scsi_activate_tcq(sdev, dev->openings + dev->active); 1340 dev->openings + dev->active);
1343 break;
1344 default: 1341 default:
1345 /* 1342 /*
1346 * We allow the OS to queue 2 untagged transactions to 1343 * We allow the OS to queue 2 untagged transactions to
@@ -1348,7 +1345,7 @@ ahc_platform_set_tags(struct ahc_softc *ahc, struct scsi_device *sdev,
1348 * serially on the controller/device. This should 1345 * serially on the controller/device. This should
1349 * remove some latency. 1346 * remove some latency.
1350 */ 1347 */
1351 scsi_deactivate_tcq(sdev, 2); 1348 scsi_adjust_queue_depth(sdev, 2);
1352 break; 1349 break;
1353 } 1350 }
1354} 1351}
@@ -1447,7 +1444,7 @@ ahc_linux_run_command(struct ahc_softc *ahc, struct ahc_linux_device *dev,
1447 * we are storing a full busy target *lun* 1444 * we are storing a full busy target *lun*
1448 * table in SCB space. 1445 * table in SCB space.
1449 */ 1446 */
1450 if (!blk_rq_tagged(cmd->request) 1447 if (!(cmd->flags & SCMD_TAGGED)
1451 && (ahc->features & AHC_SCB_BTT) == 0) { 1448 && (ahc->features & AHC_SCB_BTT) == 0) {
1452 int target_offset; 1449 int target_offset;
1453 1450
@@ -1501,15 +1498,7 @@ ahc_linux_run_command(struct ahc_softc *ahc, struct ahc_linux_device *dev,
1501 } 1498 }
1502 1499
1503 if ((dev->flags & (AHC_DEV_Q_TAGGED|AHC_DEV_Q_BASIC)) != 0) { 1500 if ((dev->flags & (AHC_DEV_Q_TAGGED|AHC_DEV_Q_BASIC)) != 0) {
1504 int msg_bytes; 1501 if (dev->commands_since_idle_or_otag == AHC_OTAG_THRESH
1505 uint8_t tag_msgs[2];
1506
1507 msg_bytes = scsi_populate_tag_msg(cmd, tag_msgs);
1508 if (msg_bytes && tag_msgs[0] != MSG_SIMPLE_TASK) {
1509 hscb->control |= tag_msgs[0];
1510 if (tag_msgs[0] == MSG_ORDERED_TASK)
1511 dev->commands_since_idle_or_otag = 0;
1512 } else if (dev->commands_since_idle_or_otag == AHC_OTAG_THRESH
1513 && (dev->flags & AHC_DEV_Q_TAGGED) != 0) { 1502 && (dev->flags & AHC_DEV_Q_TAGGED) != 0) {
1514 hscb->control |= MSG_ORDERED_TASK; 1503 hscb->control |= MSG_ORDERED_TASK;
1515 dev->commands_since_idle_or_otag = 0; 1504 dev->commands_since_idle_or_otag = 0;