diff options
author | Dan Williams <dan.j.williams@intel.com> | 2012-02-15 16:20:31 -0500 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2012-05-17 15:27:12 -0400 |
commit | 1844e4789fe5c97a9ff3bb82628111abbe7cc846 (patch) | |
tree | e0ee7084e73d91ef0c0ec29d078f85549d18679e /drivers/scsi | |
parent | 944b787d0a469a376f4d6699eb01138823197513 (diff) |
isci: kill ->status, and ->state_lock in isci_host
They serve no incremental purpose over the existing sas_ha state.
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/isci/host.c | 11 | ||||
-rw-r--r-- | drivers/scsi/isci/host.h | 23 |
2 files changed, 0 insertions, 34 deletions
diff --git a/drivers/scsi/isci/host.c b/drivers/scsi/isci/host.c index 83886a27e848..d647b07ba1a3 100644 --- a/drivers/scsi/isci/host.c +++ b/drivers/scsi/isci/host.c | |||
@@ -642,7 +642,6 @@ static void isci_host_start_complete(struct isci_host *ihost, enum sci_status co | |||
642 | if (completion_status != SCI_SUCCESS) | 642 | if (completion_status != SCI_SUCCESS) |
643 | dev_info(&ihost->pdev->dev, | 643 | dev_info(&ihost->pdev->dev, |
644 | "controller start timed out, continuing...\n"); | 644 | "controller start timed out, continuing...\n"); |
645 | isci_host_change_state(ihost, isci_ready); | ||
646 | clear_bit(IHOST_START_PENDING, &ihost->flags); | 645 | clear_bit(IHOST_START_PENDING, &ihost->flags); |
647 | wake_up(&ihost->eventq); | 646 | wake_up(&ihost->eventq); |
648 | } | 647 | } |
@@ -657,12 +656,7 @@ int isci_host_scan_finished(struct Scsi_Host *shost, unsigned long time) | |||
657 | 656 | ||
658 | sas_drain_work(ha); | 657 | sas_drain_work(ha); |
659 | 658 | ||
660 | dev_dbg(&ihost->pdev->dev, | ||
661 | "%s: ihost->status = %d, time = %ld\n", | ||
662 | __func__, isci_host_get_state(ihost), time); | ||
663 | |||
664 | return 1; | 659 | return 1; |
665 | |||
666 | } | 660 | } |
667 | 661 | ||
668 | /** | 662 | /** |
@@ -1054,7 +1048,6 @@ void isci_host_scan_start(struct Scsi_Host *shost) | |||
1054 | 1048 | ||
1055 | static void isci_host_stop_complete(struct isci_host *ihost, enum sci_status completion_status) | 1049 | static void isci_host_stop_complete(struct isci_host *ihost, enum sci_status completion_status) |
1056 | { | 1050 | { |
1057 | isci_host_change_state(ihost, isci_stopped); | ||
1058 | sci_controller_disable_interrupts(ihost); | 1051 | sci_controller_disable_interrupts(ihost); |
1059 | clear_bit(IHOST_STOP_PENDING, &ihost->flags); | 1052 | clear_bit(IHOST_STOP_PENDING, &ihost->flags); |
1060 | wake_up(&ihost->eventq); | 1053 | wake_up(&ihost->eventq); |
@@ -1262,7 +1255,6 @@ void isci_host_deinit(struct isci_host *ihost) | |||
1262 | for (i = 0; i < isci_gpio_count(ihost); i++) | 1255 | for (i = 0; i < isci_gpio_count(ihost); i++) |
1263 | writel(SGPIO_HW_CONTROL, &ihost->scu_registers->peg0.sgpio.output_data_select[i]); | 1256 | writel(SGPIO_HW_CONTROL, &ihost->scu_registers->peg0.sgpio.output_data_select[i]); |
1264 | 1257 | ||
1265 | isci_host_change_state(ihost, isci_stopping); | ||
1266 | for (i = 0; i < SCI_MAX_PORTS; i++) { | 1258 | for (i = 0; i < SCI_MAX_PORTS; i++) { |
1267 | struct isci_port *iport = &ihost->ports[i]; | 1259 | struct isci_port *iport = &ihost->ports[i]; |
1268 | struct isci_remote_device *idev, *d; | 1260 | struct isci_remote_device *idev, *d; |
@@ -2494,12 +2486,9 @@ int isci_host_init(struct isci_host *ihost) | |||
2494 | struct sci_user_parameters sci_user_params; | 2486 | struct sci_user_parameters sci_user_params; |
2495 | struct isci_pci_info *pci_info = to_pci_info(ihost->pdev); | 2487 | struct isci_pci_info *pci_info = to_pci_info(ihost->pdev); |
2496 | 2488 | ||
2497 | spin_lock_init(&ihost->state_lock); | ||
2498 | spin_lock_init(&ihost->scic_lock); | 2489 | spin_lock_init(&ihost->scic_lock); |
2499 | init_waitqueue_head(&ihost->eventq); | 2490 | init_waitqueue_head(&ihost->eventq); |
2500 | 2491 | ||
2501 | isci_host_change_state(ihost, isci_starting); | ||
2502 | |||
2503 | status = sci_controller_construct(ihost, scu_base(ihost), | 2492 | status = sci_controller_construct(ihost, scu_base(ihost), |
2504 | smu_base(ihost)); | 2493 | smu_base(ihost)); |
2505 | 2494 | ||
diff --git a/drivers/scsi/isci/host.h b/drivers/scsi/isci/host.h index a9679ee7084b..81485b4a1a51 100644 --- a/drivers/scsi/isci/host.h +++ b/drivers/scsi/isci/host.h | |||
@@ -191,9 +191,7 @@ struct isci_host { | |||
191 | struct asd_sas_port sas_ports[SCI_MAX_PORTS]; | 191 | struct asd_sas_port sas_ports[SCI_MAX_PORTS]; |
192 | struct sas_ha_struct sas_ha; | 192 | struct sas_ha_struct sas_ha; |
193 | 193 | ||
194 | spinlock_t state_lock; | ||
195 | struct pci_dev *pdev; | 194 | struct pci_dev *pdev; |
196 | enum isci_status status; | ||
197 | #define IHOST_START_PENDING 0 | 195 | #define IHOST_START_PENDING 0 |
198 | #define IHOST_STOP_PENDING 1 | 196 | #define IHOST_STOP_PENDING 1 |
199 | unsigned long flags; | 197 | unsigned long flags; |
@@ -315,27 +313,6 @@ static inline struct isci_pci_info *to_pci_info(struct pci_dev *pdev) | |||
315 | id < ARRAY_SIZE(to_pci_info(pdev)->hosts) && ihost; \ | 313 | id < ARRAY_SIZE(to_pci_info(pdev)->hosts) && ihost; \ |
316 | ihost = to_pci_info(pdev)->hosts[++id]) | 314 | ihost = to_pci_info(pdev)->hosts[++id]) |
317 | 315 | ||
318 | static inline enum isci_status isci_host_get_state(struct isci_host *isci_host) | ||
319 | { | ||
320 | return isci_host->status; | ||
321 | } | ||
322 | |||
323 | static inline void isci_host_change_state(struct isci_host *isci_host, | ||
324 | enum isci_status status) | ||
325 | { | ||
326 | unsigned long flags; | ||
327 | |||
328 | dev_dbg(&isci_host->pdev->dev, | ||
329 | "%s: isci_host = %p, state = 0x%x", | ||
330 | __func__, | ||
331 | isci_host, | ||
332 | status); | ||
333 | spin_lock_irqsave(&isci_host->state_lock, flags); | ||
334 | isci_host->status = status; | ||
335 | spin_unlock_irqrestore(&isci_host->state_lock, flags); | ||
336 | |||
337 | } | ||
338 | |||
339 | static inline void wait_for_start(struct isci_host *ihost) | 316 | static inline void wait_for_start(struct isci_host *ihost) |
340 | { | 317 | { |
341 | wait_event(ihost->eventq, !test_bit(IHOST_START_PENDING, &ihost->flags)); | 318 | wait_event(ihost->eventq, !test_bit(IHOST_START_PENDING, &ihost->flags)); |