Commit 6856ebbf3e46c8184cec15f59d6436692f85d8ba causes libsas panic on SATA DVD
This patch:
commit 6856ebbf3e46c8184cec15f59d6436692f85d8ba
Author: Tejun Heo <[email protected]> Date: Mon Apr 7 22:47:20 2008 +0900
libata: replace tf_read with qc_fill_rtf for non-SFF drivers
Takes away our libsas port_ops->sff_tf_read
However, as soon as we get into atapi_request_sense() we hit
#ifdef CONFIG_ATA_SFF ap->ops->sff_tf_read(ap, &qc->tf);
#endif
And panic.
atapi_request_sense seems to be unavoidable if we hit an AC_ERR_DEV in atapi_qc_complete
How is this supposed to work?
James
Quoted 14 lines · James Bottomley
This patch:
commit
6856ebbf3e46c8184cec15f59d6436692f85d8baAuthor: Tejun Heo <[email protected]> Date: Mon Apr 7 22:47:20 2008 +0900libata: replace
tf_readwithqc_fill_rtffor non-SFF driversTakes away our libsas
port_ops->sff_tf_readHowever, as soon as we get into
atapi_request_sense()we hit#ifdef CONFIG_ATA_SFF ap->ops->sff_tf_read(ap, &qc->tf);
Quoted 8 lines
#endif
And panic.
atapi_request_senseseems to be unavoidable if we hit anAC_ERR_DEVinatapi_qc_completeHow is this supposed to work?
This is the patch that fixes the panic for me. It looks like this was just an oversight in the conversion to qc_fill_rtf.
James
---
drivers/ata/libata-scsi.c +1 -3
@@ -2390,9 +2390,7 @@ static void atapi_request_sense(struct ata_queued_cmd *qc)/* FIXME: is this needed? */ memset (cmd->sense_buffer,0 ,SCSI_SENSE_BUFFERSIZE ); -#ifdef CONFIG_ATA_SFF - ap->ops->sff_tf_read (ap, &qc->tf); -#endif + ap->ops->qc_fill_rtf (qc);/* fill these in, for the case where they are -not- overwritten */ cmd->sense_buffer[0 ] =0x70 ;
Hello, James.
Quoted 17 lines · James Bottomley
Quoted 16 lines · James Bottomley
This patch:
commit
6856ebbf3e46c8184cec15f59d6436692f85d8baAuthor: Tejun Heo <[email protected]> Date: Mon Apr 7 22:47:20 2008 +0900libata: replace
tf_readwithqc_fill_rtffor non-SFF driversTakes away our libsas
port_ops->sff_tf_readHowever, as soon as we get into
atapi_request_sense()we hit#ifdef CONFIG_ATA_SFF ap->ops->sff_tf_read(ap, &qc->tf);#endif
Quoted 6 lines
Quoted 6 lines
And panic.
atapi_request_senseseems to be unavoidable if we hit anAC_ERR_DEVinatapi_qc_completeHow is this supposed to work?
Ah.. Right. I forgot sas was non-SFF + old EH there.
Quoted 13 lines
This is the patch that fixes the panic for me. It looks like this was just an oversight in the conversion to
qc_fill_rtf.James
---
drivers/ata/libata-scsi.c +0
-0
drivers/ata/libata-scsi.c static void atapi_request_sense(struct ata_queued_cmd *qc) · line 2396
Quoted 10 lines
drivers/ata/libata-scsi.c +1
-3@@ -2390,9 +2390,7 @@ static void atapi_request_sense(struct ata_queued_cmd *qc)/* FIXME: is this needed? */ memset (cmd->sense_buffer,0 ,SCSI_SENSE_BUFFERSIZE ); -#ifdef CONFIG_ATA_SFF - ap->ops->sff_tf_read (ap, &qc->tf); -#endif + ap->ops->qc_fill_rtf (qc);/* fill these in, for the case where they are -not- overwritten */ cmd->sense_buffer[0 ] =0x70 ;
I think what's more appropriate is to just add
if (ap->ops->sff_tf_read)
on top of it or just kill it altogether. TF is already read when the original command failed with CHECK SENSE. Will send a patch.
Signature · 1 line
tejun