This patch series attempts to clean up the SCSI error handling a bit.
See comments in below TOC or patch emails. All of the below have been
tested in success and error paths through the VERIFY_10 and ATA_16
commands using the AHCI driver.
IMPORTANT: the patchset below against libata-dev-2.6
02_libata_ahci-err-int.patch
(included in libata-2.6) Fixes AHCI bits during handling of
fatal error int.
Signed-off-by: Brett Russ [EMAIL PROTECTED]
ahci.c |4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
Index: libata-dev-2.6/drivers/scsi/ahci.c
03_libata_update_desc_code.patch
Change the ATA pass through sense block descriptor code to
0x09 per SAT
Signed-off-by: Brett Russ [EMAIL PROTECTED]
libata-scsi.c |4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
Index: libata-dev-2.6/drivers/scsi/libata-scsi.c
until a spec says
differently. Sound ok?
Signed-off-by: Brett Russ [EMAIL PROTECTED]
libata-scsi.c | 342 +-
libata.h |1
2 files changed, 197 insertions(+), 146 deletions(-)
Index: libata-dev-2.6/drivers/scsi/libata
01_libata_garzik-ahci-tf-read.patch
(included in libata-2.6) This is Jeff's tf_read() support
patch for AHCI.
Signed-off-by: Jeff Garzik [EMAIL PROTECTED]
ahci.c | 11 +++
1 files changed, 11 insertions(+)
Index: libata-dev-2.6/drivers/scsi/ahci.c
to properly report
this.
Signed-off-by: Brett Russ [EMAIL PROTECTED]
libata-scsi.c |7 ++-
1 files changed, 6 insertions(+), 1 deletion(-)
Index: libata-dev-2.6/drivers/scsi/libata-scsi.c
===
--- libata-dev-2.6.orig
These patches are a resubmit of patch 5/5 of the first series
submitted 2005-03-17. Jeff requested that the single patch be split
into a suggested 3 smaller patches; the results are below. I also
took this opportunity to further clean up the changes.
[ Start of patch descriptions ]
01_libata_libata-whitespace.patch
This patch adjusts some whitespace to bring the format of
libata-scsi.c to a consistent state.
Signed-off-by: Brett Russ [EMAIL PROTECTED]
libata-scsi.c | 112 +-
1 files changed, 50
were changed a bit as well.
- ata_scsi_qc_complete() has been modified to fix a bug where
ATA_12/16 commands would not generate a sense block on
error. Other changes made here as well, including the call
to ata_dump_status().
Signed-off-by: Brett Russ [EMAIL
02_libata_ata_dump_status.patch
This patch introduces the ata_dump_status() function, which
for now is called from ata_to_sense_error() only.
Signed-off-by: Brett Russ [EMAIL PROTECTED]
libata-scsi.c | 76 +-
1 files
spec'd as necessary when handling error ints.
Signed-off-by: Brett Russ [EMAIL PROTECTED]
= drivers/scsi/ahci.c 1.17 vs edited =
--- 1.17/drivers/scsi/ahci.c2005-02-24 14:52:41 -05:00
+++ edited/drivers/scsi/ahci.c 2005-03-09 15:30:06 -05:00
@@ -538,7 +538,7 @@
/* stop DMA
not sending anything like that yet.
Signed-off-by: Brett Russ [EMAIL PROTECTED]
Index: libata-dev-2.6/drivers/scsi/libata-core.c
===
--- libata-dev-2.6.orig/drivers/scsi/libata-core.c 2005-03-23
16:44:48.0 -0500
+++ libata
Updated patch to fix erroneous flush of COMRESET set and missing flush
of COMRESET clear. Created a new routine scr_write_flush() to try to
prevent this in the future. Also, this patch is based on libata-2.6
instead of the previous libata-dev-2.6 based patch.
Signed-off-by: Brett Russ [EMAIL
Jeff Garzik wrote:
Can you try this patch?
If it fixes the oops, I'll forward upstream ASAP.
Jeff,
It fixes the oops (pasted below) for me; please do push it ASAP.
thanks,
BR
xlated vfy cmd LBA 0x14f500 cnt 20
ahci_interrupt: int on port 2
ahci_host_intr: fatal int seen
ahci_intr_error: port 2
);
+}
+
+MODULE_AUTHOR(Brett Russ);
+MODULE_DESCRIPTION(SCSI low-level driver for Marvell SATA controllers);
+MODULE_LICENSE(GPL);
+MODULE_DEVICE_TABLE(pci, mv_pci_tbl);
+MODULE_VERSION(DRV_VERSION);
+
+module_init(mv_init);
+module_exit(mv_exit);
Index: linux-2.6.13/drivers/scsi/Kconfig
which
agrees with the existing comments; perhaps they all should get 0x1f to
indicate driver support for PIO4-0 but that can be done later.
Signed-off-by: Brett Russ [EMAIL PROTECTED]
Index: linux-2.6.13/drivers/scsi/ahci.c
Jiri Slaby wrote:
+static struct pci_device_id mv_pci_tbl[] = {
+{PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x5040), 0, 0, chip_504x},
+{PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x5041), 0, 0, chip_504x},
+{PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x5080), 0, 0, chip_508x},
+
support is in the works and should be done
shortly. Review, testing (especially on other flavors of Marvell),
comments welcome.
Thank you,
BR
Signed-off-by: Brett Russ [EMAIL PROTECTED]
Index: linux-2.6.13/drivers/scsi/sata_mv.c
level driver for the Marvell SATA
family. Currently it successfully runs in PIO mode on a 6081 chip.
EDMA support is in the works and should be done shortly. Review,
testing (especially on other flavors of Marvell), comments welcome.
Thank you,
BR
Signed-off-by: Brett Russ [EMAIL PROTECTED
Brett Russ wrote:
This is my libata compatible low level driver for the Marvell SATA
family. Currently it successfully runs in PIO mode on a 6081 chip.
EDMA support is in the works and should be done shortly. Review,
testing (especially on other flavors of Marvell), comments welcome.
Note
adjustments to comply with the way pio_mask is
used. I changed the masks from the commented values to all support
PIO4-0, since the spec mandates that PIO0-2 are supported and there's
no reason not to support PIO3 IMO.
Signed-off-by: Brett Russ [EMAIL PROTECTED]
Index: linux-2.6.13/drivers/scsi
for sleep... :-)
BR
This patch depends on the PCI INTx patch (but will probably work w/o):
http://lkml.org/lkml/2005/8/15/165
Signed-off-by: Brett Russ [EMAIL PROTECTED]
Index: linux-2.6.13/drivers/scsi/ahci.c
===
--- linux-2.6.13.orig
Jeff Garzik wrote:
Brett Russ wrote:
Simple cleanup to eliminate X copies of the same function in libata.
Moved pci_enable_intx() to pci.c, added pci_disable_intx() as well,
and use them throughout libata and msi.c.
Signed-off-by: Brett Russ [EMAIL PROTECTED]
Though
Simple cleanup to eliminate X copies of the pci_enable_intx() function
in libata. Moved pci_enable_intx() to pci.c as pci_intx() and use it
throughout libata and msi.c.
Signed-off-by: Brett Russ [EMAIL PROTECTED]
Index: linux-2.6.12.3-mv/drivers/pci/msi.c
Simple cleanup to eliminate X copies of the pci_enable_intx() function
in libata. Moved ahci.c's pci_intx() to pci.c and use it throughout
libata and msi.c.
Signed-off-by: Brett Russ [EMAIL PROTECTED]
Index: linux-2.6.13-rc6/drivers/scsi/sata_sis.c
Greg KH wrote:
On Fri, Aug 12, 2005 at 06:43:03PM -0400, Brett Russ wrote:
Simple cleanup to eliminate X copies of the pci_enable_intx() function
in libata. Moved ahci.c's pci_intx() to pci.c and use it throughout
libata and msi.c.
Signed-off-by: Brett Russ [EMAIL PROTECTED]
It would have
Greg KH wrote:
Hmm, I did build it before submitting, saw not even a warning. So I
just rebuilt it again to verify, and same thing. Why would my tree work
and not yours? config file?
You don't have MSI enabled in yours :(
Yup, you're right. Sorry about that. The patch I sent @15:23
Jeff Garzik wrote:
In such cases, patches are divided into branches by category: ncq (NCQ
queueing support), chs-support (C/H/S support), adma (new ADMA driver),
sil24 (new Silicon Image 312x driver), passthru (ATA passthrough/SMART
support), etc.
Jeff,
The below doesn't seem to include
Simple cleanup to eliminate X copies of the same function in libata.
Moved pci_enable_intx() to pci.c, added pci_disable_intx() as well,
and use them throughout libata and msi.c.
Signed-off-by: Brett Russ [EMAIL PROTECTED]
Index: linux-2.6.12.3-mv/drivers/pci/msi.c
Jeff Garzik wrote:
Brett Russ wrote:
2) Isn't it wrong for the IRQ disable at the chip to occur *after*
free_irq() is called to disconnect the handler (independent of
question 1...since this is the case currently)? Granted, all of the
ports have gone through scsi_remove_host
Jeff Garzik wrote:
applied
There are some issues with this. One of which I fixed and the other is
a bit confusing. The one I fixed concerned the 5xxx chips not
supporting the master reset functionality. The other problem has been
reported by 2 people so far. I have a stack trace from
Updated patch to fix erroneous flush of COMRESET set and missing flush
of COMRESET clear. Created a new routine scr_write_flush() to try to
prevent this in the future. Also, this patch is based on libata-2.6
instead of the previous libata-dev-2.6 based patch.
Signed-off-by: Brett Russ <[EM
spec'd as necessary when handling error ints.
Signed-off-by: Brett Russ <[EMAIL PROTECTED]>
= drivers/scsi/ahci.c 1.17 vs edited =
--- 1.17/drivers/scsi/ahci.c2005-02-24 14:52:41 -05:00
+++ edited/drivers/scsi/ahci.c 2005-03-09 15:30:06 -05:00
@@ -538,7 +538,7 @@
/* st
Jeff Garzik wrote:
Can you try this patch?
If it fixes the oops, I'll forward upstream ASAP.
Jeff,
It fixes the oops (pasted below) for me; please do push it ASAP.
thanks,
BR
xlated vfy cmd LBA 0x14f500 cnt 20
ahci_interrupt: int on port 2
ahci_host_intr: fatal int seen
ahci_intr_error: port 2
This patch series attempts to clean up the SCSI error handling a bit.
See comments in below TOC or patch emails. All of the below have been
tested in success and error paths through the VERIFY_10 and ATA_16
commands using the AHCI driver.
IMPORTANT: the patchset below against libata-dev-2.6
02_libata_ahci-err-int.patch
(included in libata-2.6) Fixes AHCI bits during handling of
fatal error int.
Signed-off-by: Brett Russ <[EMAIL PROTECTED]>
ahci.c |4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
Index: libata-dev-2.6/drivers/scsi/
03_libata_update_desc_code.patch
Change the ATA pass through sense block descriptor code to
0x09 per SAT
Signed-off-by: Brett Russ <[EMAIL PROTECTED]>
libata-scsi.c |4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
Index: libata-dev-2.6/drivers/scsi/libata-
until a spec says
differently. Sound ok?
Signed-off-by: Brett Russ <[EMAIL PROTECTED]>
libata-scsi.c | 342 +-
libata.h |1
2 files changed, 197 insertions(+), 146 deletions(-)
Index: libata-dev-2.6/driver
01_libata_garzik-ahci-tf-read.patch
(included in libata-2.6) This is Jeff's tf_read() support
patch for AHCI.
Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
ahci.c | 11 +++
1 files changed, 11 insertions(+)
Index: libata-dev-2.6/drivers/scsi/ahci.c
to properly report
this.
Signed-off-by: Brett Russ <[EMAIL PROTECTED]>
libata-scsi.c |7 ++-
1 files changed, 6 insertions(+), 1 deletion(-)
Index: libata-dev-2.6/drivers/scsi/libata-scsi.c
===
--- libata-dev-2.
These patches are a resubmit of patch 5/5 of the first series
submitted 2005-03-17. Jeff requested that the single patch be split
into a suggested 3 smaller patches; the results are below. I also
took this opportunity to further clean up the changes.
[ Start of patch descriptions ]
01_libata_libata-whitespace.patch
This patch adjusts some whitespace to bring the format of
libata-scsi.c to a consistent state.
Signed-off-by: Brett Russ <[EMAIL PROTECTED]>
libata-scsi.c | 112 +-
1 files chang
were changed a bit as well.
- ata_scsi_qc_complete() has been modified to fix a bug where
ATA_12/16 commands would not generate a sense block on
error. Other changes made here as well, including the call
to ata_dump_status().
Signed-off-by: Brett Russ <[EM
02_libata_ata_dump_status.patch
This patch introduces the ata_dump_status() function, which
for now is called from ata_to_sense_error() only.
Signed-off-by: Brett Russ <[EMAIL PROTECTED]>
libata-scsi.c | 76 +-
1
set() so I'm not sending anything like that yet.
Signed-off-by: Brett Russ <[EMAIL PROTECTED]>
Index: libata-dev-2.6/drivers/scsi/libata-core.c
===
--- libata-dev-2.6.orig/drivers/scsi/libata-core.c 2005-03-23
16:44:
Simple cleanup to eliminate X copies of the same function in libata.
Moved pci_enable_intx() to pci.c, added pci_disable_intx() as well,
and use them throughout libata and msi.c.
Signed-off-by: Brett Russ <[EMAIL PROTECTED]>
Index: linux-2.6.12.3-mv/drivers/pci
Jeff Garzik wrote:
> Brett Russ wrote:
>
>> Simple cleanup to eliminate X copies of the same function in libata.
>> Moved pci_enable_intx() to pci.c, added pci_disable_intx() as well,
>> and use them throughout libata and msi.c.
>>
>> Signed-
Simple cleanup to eliminate X copies of the pci_enable_intx() function
in libata. Moved pci_enable_intx() to pci.c as pci_intx() and use it
throughout libata and msi.c.
Signed-off-by: Brett Russ <[EMAIL PROTECTED]>
Index: linux-2.6.12.3-mv/drivers/pci
Simple cleanup to eliminate X copies of the pci_enable_intx() function
in libata. Moved ahci.c's pci_intx() to pci.c and use it throughout
libata and msi.c.
Signed-off-by: Brett Russ <[EMAIL PROTECTED]>
Index: linux-2.6.13-rc6/drivers/scsi/sata
Greg KH wrote:
On Fri, Aug 12, 2005 at 06:43:03PM -0400, Brett Russ wrote:
Simple cleanup to eliminate X copies of the pci_enable_intx() function
in libata. Moved ahci.c's pci_intx() to pci.c and use it throughout
libata and msi.c.
Signed-off-by: Brett Russ <[EMAIL PROTECTED]>
It
Greg KH wrote:
Hmm, I did build it before submitting, saw not even a warning. So I
just rebuilt it again to verify, and same thing. Why would my tree work
and not yours? config file?
You don't have MSI enabled in yours :(
Yup, you're right. Sorry about that. The patch I sent @15:23
Jeff Garzik wrote:
In such cases, patches are divided into branches by category: ncq (NCQ
queueing support), chs-support (C/H/S support), adma (new ADMA driver),
sil24 (new Silicon Image 312x driver), passthru (ATA passthrough/SMART
support), etc.
Jeff,
The below doesn't seem to include
(void) pci_read_config_dword(pdev,b,[w]);
+ b += sizeof(*dw);
+ }
+ VPRINTK("%08x %08x %08x %08x\n",
+ dw[0],dw[1],dw[2],dw[3]);
+ }
+ }
+
+ /* FIXME:
which
agrees with the existing comments; perhaps they all should get 0x1f to
indicate driver support for PIO4-0 but that can be done later.
Signed-off-by: Brett Russ <[EMAIL PROTECTED]>
Index: linux-2.6.13/drivers/scsi/
Jiri Slaby wrote:
+static struct pci_device_id mv_pci_tbl[] = {
+{PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x5040), 0, 0, chip_504x},
+{PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x5041), 0, 0, chip_504x},
+{PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x5080), 0, 0, chip_508x},
+
support is in the works and should be done
shortly. Review, testing (especially on other flavors of Marvell),
comments welcome.
Thank you,
BR
Signed-off-by: Brett Russ <[EMAIL PROTECTED]>
Index: linux-2.6.13/drivers/scsi/sat
level driver for the Marvell SATA
family. Currently it successfully runs in PIO mode on a 6081 chip.
EDMA support is in the works and should be done shortly. Review,
testing (especially on other flavors of Marvell), comments welcome.
Thank you,
BR
Signed-off-by: Brett Russ <[EMAIL PROTEC
Brett Russ wrote:
This is my libata compatible low level driver for the Marvell SATA
family. Currently it successfully runs in PIO mode on a 6081 chip.
EDMA support is in the works and should be done shortly. Review,
testing (especially on other flavors of Marvell), comments welcome.
Note
adjustments to comply with the way pio_mask is
used. I changed the masks from the commented values to all support
PIO4-0, since the spec mandates that PIO0-2 are supported and there's
no reason not to support PIO3 IMO.
Signed-off-by: Brett Russ <[EMAIL PROTECTED]>
Index: linux-2.6.13/driver
for sleep... :-)
BR
This patch depends on the PCI INTx patch (but will probably work w/o):
http://lkml.org/lkml/2005/8/15/165
Signed-off-by: Brett Russ <[EMAIL PROTECTED]>
Index: linux-2.6.13/drivers/scsi/ahci.c
===
--- linux-
Jeff Garzik wrote:
Brett Russ wrote:
2) Isn't it wrong for the IRQ disable at the chip to occur *after*
free_irq() is called to disconnect the handler (independent of
question 1...since this is the case currently)? Granted, all of the
ports have gone through scsi_remove_host
Jeff Garzik wrote:
applied
There are some issues with this. One of which I fixed and the other is
a bit confusing. The one I fixed concerned the 5xxx chips not
supporting the master reset functionality. The other problem has been
reported by 2 people so far. I have a stack trace from
62 matches
Mail list logo