diff options
Diffstat (limited to 'drivers/scsi/libsas/sas_discover.c')
-rw-r--r-- | drivers/scsi/libsas/sas_discover.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/drivers/scsi/libsas/sas_discover.c b/drivers/scsi/libsas/sas_discover.c index a0c3003e0c7d..62b58d38ce2e 100644 --- a/drivers/scsi/libsas/sas_discover.c +++ b/drivers/scsi/libsas/sas_discover.c | |||
@@ -39,11 +39,11 @@ | |||
39 | void sas_init_dev(struct domain_device *dev) | 39 | void sas_init_dev(struct domain_device *dev) |
40 | { | 40 | { |
41 | switch (dev->dev_type) { | 41 | switch (dev->dev_type) { |
42 | case SAS_END_DEV: | 42 | case SAS_END_DEVICE: |
43 | INIT_LIST_HEAD(&dev->ssp_dev.eh_list_node); | 43 | INIT_LIST_HEAD(&dev->ssp_dev.eh_list_node); |
44 | break; | 44 | break; |
45 | case EDGE_DEV: | 45 | case SAS_EDGE_EXPANDER_DEVICE: |
46 | case FANOUT_DEV: | 46 | case SAS_FANOUT_EXPANDER_DEVICE: |
47 | INIT_LIST_HEAD(&dev->ex_dev.children); | 47 | INIT_LIST_HEAD(&dev->ex_dev.children); |
48 | mutex_init(&dev->ex_dev.cmd_mutex); | 48 | mutex_init(&dev->ex_dev.cmd_mutex); |
49 | break; | 49 | break; |
@@ -93,9 +93,9 @@ static int sas_get_port_device(struct asd_sas_port *port) | |||
93 | if (fis->interrupt_reason == 1 && fis->lbal == 1 && | 93 | if (fis->interrupt_reason == 1 && fis->lbal == 1 && |
94 | fis->byte_count_low==0x69 && fis->byte_count_high == 0x96 | 94 | fis->byte_count_low==0x69 && fis->byte_count_high == 0x96 |
95 | && (fis->device & ~0x10) == 0) | 95 | && (fis->device & ~0x10) == 0) |
96 | dev->dev_type = SATA_PM; | 96 | dev->dev_type = SAS_SATA_PM; |
97 | else | 97 | else |
98 | dev->dev_type = SATA_DEV; | 98 | dev->dev_type = SAS_SATA_DEV; |
99 | dev->tproto = SAS_PROTOCOL_SATA; | 99 | dev->tproto = SAS_PROTOCOL_SATA; |
100 | } else { | 100 | } else { |
101 | struct sas_identify_frame *id = | 101 | struct sas_identify_frame *id = |
@@ -109,21 +109,21 @@ static int sas_get_port_device(struct asd_sas_port *port) | |||
109 | 109 | ||
110 | dev->port = port; | 110 | dev->port = port; |
111 | switch (dev->dev_type) { | 111 | switch (dev->dev_type) { |
112 | case SATA_DEV: | 112 | case SAS_SATA_DEV: |
113 | rc = sas_ata_init(dev); | 113 | rc = sas_ata_init(dev); |
114 | if (rc) { | 114 | if (rc) { |
115 | rphy = NULL; | 115 | rphy = NULL; |
116 | break; | 116 | break; |
117 | } | 117 | } |
118 | /* fall through */ | 118 | /* fall through */ |
119 | case SAS_END_DEV: | 119 | case SAS_END_DEVICE: |
120 | rphy = sas_end_device_alloc(port->port); | 120 | rphy = sas_end_device_alloc(port->port); |
121 | break; | 121 | break; |
122 | case EDGE_DEV: | 122 | case SAS_EDGE_EXPANDER_DEVICE: |
123 | rphy = sas_expander_alloc(port->port, | 123 | rphy = sas_expander_alloc(port->port, |
124 | SAS_EDGE_EXPANDER_DEVICE); | 124 | SAS_EDGE_EXPANDER_DEVICE); |
125 | break; | 125 | break; |
126 | case FANOUT_DEV: | 126 | case SAS_FANOUT_EXPANDER_DEVICE: |
127 | rphy = sas_expander_alloc(port->port, | 127 | rphy = sas_expander_alloc(port->port, |
128 | SAS_FANOUT_EXPANDER_DEVICE); | 128 | SAS_FANOUT_EXPANDER_DEVICE); |
129 | break; | 129 | break; |
@@ -156,7 +156,7 @@ static int sas_get_port_device(struct asd_sas_port *port) | |||
156 | dev->rphy = rphy; | 156 | dev->rphy = rphy; |
157 | get_device(&dev->rphy->dev); | 157 | get_device(&dev->rphy->dev); |
158 | 158 | ||
159 | if (dev_is_sata(dev) || dev->dev_type == SAS_END_DEV) | 159 | if (dev_is_sata(dev) || dev->dev_type == SAS_END_DEVICE) |
160 | list_add_tail(&dev->disco_list_node, &port->disco_list); | 160 | list_add_tail(&dev->disco_list_node, &port->disco_list); |
161 | else { | 161 | else { |
162 | spin_lock_irq(&port->dev_list_lock); | 162 | spin_lock_irq(&port->dev_list_lock); |
@@ -315,7 +315,7 @@ void sas_free_device(struct kref *kref) | |||
315 | dev->phy = NULL; | 315 | dev->phy = NULL; |
316 | 316 | ||
317 | /* remove the phys and ports, everything else should be gone */ | 317 | /* remove the phys and ports, everything else should be gone */ |
318 | if (dev->dev_type == EDGE_DEV || dev->dev_type == FANOUT_DEV) | 318 | if (dev->dev_type == SAS_EDGE_EXPANDER_DEVICE || dev->dev_type == SAS_FANOUT_EXPANDER_DEVICE) |
319 | kfree(dev->ex_dev.ex_phy); | 319 | kfree(dev->ex_dev.ex_phy); |
320 | 320 | ||
321 | if (dev_is_sata(dev) && dev->sata_dev.ap) { | 321 | if (dev_is_sata(dev) && dev->sata_dev.ap) { |
@@ -343,7 +343,7 @@ static void sas_unregister_common_dev(struct asd_sas_port *port, struct domain_d | |||
343 | spin_unlock_irq(&port->dev_list_lock); | 343 | spin_unlock_irq(&port->dev_list_lock); |
344 | 344 | ||
345 | spin_lock_irq(&ha->lock); | 345 | spin_lock_irq(&ha->lock); |
346 | if (dev->dev_type == SAS_END_DEV && | 346 | if (dev->dev_type == SAS_END_DEVICE && |
347 | !list_empty(&dev->ssp_dev.eh_list_node)) { | 347 | !list_empty(&dev->ssp_dev.eh_list_node)) { |
348 | list_del_init(&dev->ssp_dev.eh_list_node); | 348 | list_del_init(&dev->ssp_dev.eh_list_node); |
349 | ha->eh_active--; | 349 | ha->eh_active--; |
@@ -457,15 +457,15 @@ static void sas_discover_domain(struct work_struct *work) | |||
457 | task_pid_nr(current)); | 457 | task_pid_nr(current)); |
458 | 458 | ||
459 | switch (dev->dev_type) { | 459 | switch (dev->dev_type) { |
460 | case SAS_END_DEV: | 460 | case SAS_END_DEVICE: |
461 | error = sas_discover_end_dev(dev); | 461 | error = sas_discover_end_dev(dev); |
462 | break; | 462 | break; |
463 | case EDGE_DEV: | 463 | case SAS_EDGE_EXPANDER_DEVICE: |
464 | case FANOUT_DEV: | 464 | case SAS_FANOUT_EXPANDER_DEVICE: |
465 | error = sas_discover_root_expander(dev); | 465 | error = sas_discover_root_expander(dev); |
466 | break; | 466 | break; |
467 | case SATA_DEV: | 467 | case SAS_SATA_DEV: |
468 | case SATA_PM: | 468 | case SAS_SATA_PM: |
469 | #ifdef CONFIG_SCSI_SAS_ATA | 469 | #ifdef CONFIG_SCSI_SAS_ATA |
470 | error = sas_discover_sata(dev); | 470 | error = sas_discover_sata(dev); |
471 | break; | 471 | break; |