diff options
author | Dan Williams <dan.j.williams@intel.com> | 2012-03-22 00:09:07 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2012-04-23 07:11:47 -0400 |
commit | b2024459252a9d2d312ee562f86f332a1498f412 (patch) | |
tree | 751987779eee44a601a68c766ba2ff258b77d25a /include | |
parent | 0f3fce5cc77e1f35758ef0e46a989e76e5046a7b (diff) |
[SCSI] libsas, libata: fix start of life for a sas ata_port
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@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Acked-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/libata.h | 3 | ||||
-rw-r--r-- | include/scsi/sas_ata.h | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h index 42378d637ffb..e926df7b54c9 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -996,7 +996,8 @@ extern int ata_sas_scsi_ioctl(struct ata_port *ap, struct scsi_device *dev, | |||
996 | extern void ata_sas_port_destroy(struct ata_port *); | 996 | extern void ata_sas_port_destroy(struct ata_port *); |
997 | extern struct ata_port *ata_sas_port_alloc(struct ata_host *, | 997 | extern struct ata_port *ata_sas_port_alloc(struct ata_host *, |
998 | struct ata_port_info *, struct Scsi_Host *); | 998 | struct ata_port_info *, struct Scsi_Host *); |
999 | extern int ata_sas_async_port_init(struct ata_port *); | 999 | extern void ata_sas_async_probe(struct ata_port *ap); |
1000 | extern int ata_sas_sync_probe(struct ata_port *ap); | ||
1000 | extern int ata_sas_port_init(struct ata_port *); | 1001 | extern int ata_sas_port_init(struct ata_port *); |
1001 | extern int ata_sas_port_start(struct ata_port *ap); | 1002 | extern int ata_sas_port_start(struct ata_port *ap); |
1002 | extern void ata_sas_port_stop(struct ata_port *ap); | 1003 | extern void ata_sas_port_stop(struct ata_port *ap); |
diff --git a/include/scsi/sas_ata.h b/include/scsi/sas_ata.h index cdccd2eb7b6c..77670e823ed8 100644 --- a/include/scsi/sas_ata.h +++ b/include/scsi/sas_ata.h | |||
@@ -37,7 +37,7 @@ static inline int dev_is_sata(struct domain_device *dev) | |||
37 | } | 37 | } |
38 | 38 | ||
39 | int sas_get_ata_info(struct domain_device *dev, struct ex_phy *phy); | 39 | int sas_get_ata_info(struct domain_device *dev, struct ex_phy *phy); |
40 | int sas_ata_init_host_and_port(struct domain_device *found_dev); | 40 | int sas_ata_init(struct domain_device *dev); |
41 | void sas_ata_task_abort(struct sas_task *task); | 41 | void sas_ata_task_abort(struct sas_task *task); |
42 | void sas_ata_strategy_handler(struct Scsi_Host *shost); | 42 | void sas_ata_strategy_handler(struct Scsi_Host *shost); |
43 | void sas_ata_eh(struct Scsi_Host *shost, struct list_head *work_q, | 43 | void sas_ata_eh(struct Scsi_Host *shost, struct list_head *work_q, |
@@ -52,7 +52,7 @@ static inline int dev_is_sata(struct domain_device *dev) | |||
52 | { | 52 | { |
53 | return 0; | 53 | return 0; |
54 | } | 54 | } |
55 | static inline int sas_ata_init_host_and_port(struct domain_device *found_dev) | 55 | static inline int sas_ata_init(struct domain_device *dev) |
56 | { | 56 | { |
57 | return 0; | 57 | return 0; |
58 | } | 58 | } |