diff options
author | Tejun Heo <tj@kernel.org> | 2008-11-10 00:48:21 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-11-10 11:04:47 -0500 |
commit | 8a8bc22332ee6ea49137508467a76aa7f4367719 (patch) | |
tree | f41c62dc99c4249d592935b4659569081d4a190a /drivers/ata/libata-scsi.c | |
parent | f7160c7573615ec82c691e294cf80d920b5d588d (diff) |
libata: revert convert-to-block-tagging patches
This patch reverts the following three commits which convert libata to
use block layer tagging.
43a49cbdf31e812c0d8f553d433b09b421f5d52c
e013e13bf605b9e6b702adffbe2853cfc60e7806
2fca5ccf97d2c28bcfce44f5b07d85e74e3cd18e
Although using block layer tagging is the right direction, due to the
tight coupling among tag number, data structure allocation and
hardware command slot allocation, libata doesn't work correctly with
the current conversion.
The biggest problem is guaranteeing that tag 0 is always used for
non-NCQ commands. Due to the way blk-tag is implemented and how SCSI
starts and finishes requests, such guarantee can't be made. I'm not
sure whether this would actually break any low level driver but it
doesn't look like a good idea to break such assumption given the
frailty of ATA controllers.
So, for the time being, keep using the old dumb in-libata qc
allocation.
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Jens Axobe <jens.axboe@oracle.com>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/ata/libata-scsi.c')
-rw-r--r-- | drivers/ata/libata-scsi.c | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index 3fa75eac135d..47c7afcb36f2 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c | |||
@@ -709,11 +709,7 @@ static struct ata_queued_cmd *ata_scsi_qc_new(struct ata_device *dev, | |||
709 | { | 709 | { |
710 | struct ata_queued_cmd *qc; | 710 | struct ata_queued_cmd *qc; |
711 | 711 | ||
712 | if (cmd->request->tag != -1) | 712 | qc = ata_qc_new_init(dev); |
713 | qc = ata_qc_new_init(dev, cmd->request->tag); | ||
714 | else | ||
715 | qc = ata_qc_new_init(dev, 0); | ||
716 | |||
717 | if (qc) { | 713 | if (qc) { |
718 | qc->scsicmd = cmd; | 714 | qc->scsicmd = cmd; |
719 | qc->scsidone = done; | 715 | qc->scsidone = done; |
@@ -1108,17 +1104,7 @@ static int ata_scsi_dev_config(struct scsi_device *sdev, | |||
1108 | 1104 | ||
1109 | depth = min(sdev->host->can_queue, ata_id_queue_depth(dev->id)); | 1105 | depth = min(sdev->host->can_queue, ata_id_queue_depth(dev->id)); |
1110 | depth = min(ATA_MAX_QUEUE - 1, depth); | 1106 | depth = min(ATA_MAX_QUEUE - 1, depth); |
1111 | 1107 | scsi_adjust_queue_depth(sdev, MSG_SIMPLE_TAG, depth); | |
1112 | /* | ||
1113 | * If this device is behind a port multiplier, we have | ||
1114 | * to share the tag map between all devices on that PMP. | ||
1115 | * Set up the shared tag map here and we get automatic. | ||
1116 | */ | ||
1117 | if (dev->link->ap->pmp_link) | ||
1118 | scsi_init_shared_tag_map(sdev->host, ATA_MAX_QUEUE - 1); | ||
1119 | |||
1120 | scsi_set_tag_type(sdev, MSG_SIMPLE_TAG); | ||
1121 | scsi_activate_tcq(sdev, depth); | ||
1122 | } | 1108 | } |
1123 | 1109 | ||
1124 | return 0; | 1110 | return 0; |
@@ -1958,11 +1944,6 @@ static unsigned int ata_scsiop_inq_std(struct ata_scsi_args *args, u8 *rbuf) | |||
1958 | hdr[1] |= (1 << 7); | 1944 | hdr[1] |= (1 << 7); |
1959 | 1945 | ||
1960 | memcpy(rbuf, hdr, sizeof(hdr)); | 1946 | memcpy(rbuf, hdr, sizeof(hdr)); |
1961 | |||
1962 | /* if ncq, set tags supported */ | ||
1963 | if (ata_id_has_ncq(args->id)) | ||
1964 | rbuf[7] |= (1 << 1); | ||
1965 | |||
1966 | memcpy(&rbuf[8], "ATA ", 8); | 1947 | memcpy(&rbuf[8], "ATA ", 8); |
1967 | ata_id_string(args->id, &rbuf[16], ATA_ID_PROD, 16); | 1948 | ata_id_string(args->id, &rbuf[16], ATA_ID_PROD, 16); |
1968 | ata_id_string(args->id, &rbuf[32], ATA_ID_FW_REV, 4); | 1949 | ata_id_string(args->id, &rbuf[32], ATA_ID_FW_REV, 4); |