Re: [PATCH 09/12] libsas, libata: fix start of life for a sas ata_port

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 04/13/2012 07:37 PM, Dan Williams wrote:
This changes the ordering of initialization and probing events from:
   1/ allocate rphy in PORTE_BYTES_DMAED, DISCE_REVALIDATE_DOMAIN
   2/ allocate ata_port and schedule port probe in DISCE_PROBE
...to:
   1/ allocate ata_port in PORTE_BYTES_DMAED, DISCE_REVALIDATE_DOMAIN
   2/ allocate rphy in PORTE_BYTES_DMAED, DISCE_REVALIDATE_DOMAIN
   3/ schedule port probe in DISCE_PROBE

This ordering prevents PHYE_SIGNAL_LOSS_EVENTS from sneaking in to
destrory ata devices before they have been fully initialized:

   BUG: unable to handle kernel paging request at 0000000000003b10
   IP: [<ffffffffa0053d7e>] sas_ata_end_eh+0x12/0x5e [libsas]
   ...
   [<ffffffffa004d1af>] sas_unregister_common_dev+0x78/0xc9 [libsas]
   [<ffffffffa004d4d4>] sas_unregister_dev+0x4f/0xad [libsas]
   [<ffffffffa004d5b1>] sas_unregister_domain_devices+0x7f/0xbf [libsas]
   [<ffffffffa004c487>] sas_deform_port+0x61/0x1b8 [libsas]
   [<ffffffffa004bed0>] sas_phye_loss_of_signal+0x29/0x2b [libsas]

...and kills the awkward "sata domain_device briefly existing in the
domain without an ata_port" state.

Reported-by: Michal Kosciowski<michal.kosciowski@xxxxxxxxx>
Signed-off-by: Dan Williams<dan.j.williams@xxxxxxxxx>
---
  drivers/ata/libata-scsi.c          |   35 ++++++++++++++++++++---------------
  drivers/scsi/ipr.c                 |    6 +++++-
  drivers/scsi/libsas/sas_ata.c      |   33 ++++++++++-----------------------
  drivers/scsi/libsas/sas_discover.c |   13 ++++++++++---
  drivers/scsi/libsas/sas_expander.c |    8 +++++---
  include/linux/libata.h             |    3 ++-
  include/scsi/sas_ata.h             |    4 ++--
  7 files changed, 54 insertions(+), 48 deletions(-)

Acked-by: Jeff Garzik <jgarzik@xxxxxxxxxx>



--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux