diff options
Diffstat (limited to 'drivers/ieee1394')
| -rw-r--r-- | drivers/ieee1394/highlevel.c | 25 | ||||
| -rw-r--r-- | drivers/ieee1394/hosts.h | 4 | ||||
| -rw-r--r-- | drivers/ieee1394/nodemgr.c | 8 | ||||
| -rw-r--r-- | drivers/ieee1394/sbp2.c | 14 |
4 files changed, 34 insertions, 17 deletions
diff --git a/drivers/ieee1394/highlevel.c b/drivers/ieee1394/highlevel.c index 918ffc4fc8ac..272543a42a43 100644 --- a/drivers/ieee1394/highlevel.c +++ b/drivers/ieee1394/highlevel.c | |||
| @@ -46,10 +46,6 @@ static DEFINE_RWLOCK(hl_irqs_lock); | |||
| 46 | 46 | ||
| 47 | static DEFINE_RWLOCK(addr_space_lock); | 47 | static DEFINE_RWLOCK(addr_space_lock); |
| 48 | 48 | ||
| 49 | /* addr_space list will have zero and max already included as bounds */ | ||
| 50 | static struct hpsb_address_ops dummy_ops = { NULL, NULL, NULL, NULL }; | ||
| 51 | static struct hpsb_address_serve dummy_zero_addr, dummy_max_addr; | ||
| 52 | |||
| 53 | 49 | ||
| 54 | static struct hl_host_info *hl_get_hostinfo(struct hpsb_highlevel *hl, | 50 | static struct hl_host_info *hl_get_hostinfo(struct hpsb_highlevel *hl, |
| 55 | struct hpsb_host *host) | 51 | struct hpsb_host *host) |
| @@ -481,20 +477,23 @@ int hpsb_unregister_addrspace(struct hpsb_highlevel *hl, struct hpsb_host *host, | |||
| 481 | return retval; | 477 | return retval; |
| 482 | } | 478 | } |
| 483 | 479 | ||
| 480 | static struct hpsb_address_ops dummy_ops; | ||
| 481 | |||
| 482 | /* dummy address spaces as lower and upper bounds of the host's a.s. list */ | ||
| 484 | static void init_hpsb_highlevel(struct hpsb_host *host) | 483 | static void init_hpsb_highlevel(struct hpsb_host *host) |
| 485 | { | 484 | { |
| 486 | INIT_LIST_HEAD(&dummy_zero_addr.host_list); | 485 | INIT_LIST_HEAD(&host->dummy_zero_addr.host_list); |
| 487 | INIT_LIST_HEAD(&dummy_zero_addr.hl_list); | 486 | INIT_LIST_HEAD(&host->dummy_zero_addr.hl_list); |
| 488 | INIT_LIST_HEAD(&dummy_max_addr.host_list); | 487 | INIT_LIST_HEAD(&host->dummy_max_addr.host_list); |
| 489 | INIT_LIST_HEAD(&dummy_max_addr.hl_list); | 488 | INIT_LIST_HEAD(&host->dummy_max_addr.hl_list); |
| 490 | 489 | ||
| 491 | dummy_zero_addr.op = dummy_max_addr.op = &dummy_ops; | 490 | host->dummy_zero_addr.op = host->dummy_max_addr.op = &dummy_ops; |
| 492 | 491 | ||
| 493 | dummy_zero_addr.start = dummy_zero_addr.end = 0; | 492 | host->dummy_zero_addr.start = host->dummy_zero_addr.end = 0; |
| 494 | dummy_max_addr.start = dummy_max_addr.end = ((u64) 1) << 48; | 493 | host->dummy_max_addr.start = host->dummy_max_addr.end = ((u64) 1) << 48; |
| 495 | 494 | ||
| 496 | list_add_tail(&dummy_zero_addr.host_list, &host->addr_space); | 495 | list_add_tail(&host->dummy_zero_addr.host_list, &host->addr_space); |
| 497 | list_add_tail(&dummy_max_addr.host_list, &host->addr_space); | 496 | list_add_tail(&host->dummy_max_addr.host_list, &host->addr_space); |
| 498 | } | 497 | } |
| 499 | 498 | ||
| 500 | void highlevel_add_host(struct hpsb_host *host) | 499 | void highlevel_add_host(struct hpsb_host *host) |
diff --git a/drivers/ieee1394/hosts.h b/drivers/ieee1394/hosts.h index e4e8aeb4d778..dd229950acca 100644 --- a/drivers/ieee1394/hosts.h +++ b/drivers/ieee1394/hosts.h | |||
| @@ -13,6 +13,7 @@ struct module; | |||
| 13 | 13 | ||
| 14 | #include "ieee1394_types.h" | 14 | #include "ieee1394_types.h" |
| 15 | #include "csr.h" | 15 | #include "csr.h" |
| 16 | #include "highlevel.h" | ||
| 16 | 17 | ||
| 17 | struct hpsb_packet; | 18 | struct hpsb_packet; |
| 18 | struct hpsb_iso; | 19 | struct hpsb_iso; |
| @@ -72,6 +73,9 @@ struct hpsb_host { | |||
| 72 | struct { DECLARE_BITMAP(map, 64); } tl_pool[ALL_NODES]; | 73 | struct { DECLARE_BITMAP(map, 64); } tl_pool[ALL_NODES]; |
| 73 | 74 | ||
| 74 | struct csr_control csr; | 75 | struct csr_control csr; |
| 76 | |||
| 77 | struct hpsb_address_serve dummy_zero_addr; | ||
| 78 | struct hpsb_address_serve dummy_max_addr; | ||
| 75 | }; | 79 | }; |
| 76 | 80 | ||
| 77 | enum devctl_cmd { | 81 | enum devctl_cmd { |
diff --git a/drivers/ieee1394/nodemgr.c b/drivers/ieee1394/nodemgr.c index 9e39f73282ee..79ef5fd928ae 100644 --- a/drivers/ieee1394/nodemgr.c +++ b/drivers/ieee1394/nodemgr.c | |||
| @@ -115,8 +115,14 @@ static int nodemgr_bus_read(struct csr1212_csr *csr, u64 addr, u16 length, | |||
| 115 | return error; | 115 | return error; |
| 116 | } | 116 | } |
| 117 | 117 | ||
| 118 | #define OUI_FREECOM_TECHNOLOGIES_GMBH 0x0001db | ||
| 119 | |||
| 118 | static int nodemgr_get_max_rom(quadlet_t *bus_info_data, void *__ci) | 120 | static int nodemgr_get_max_rom(quadlet_t *bus_info_data, void *__ci) |
| 119 | { | 121 | { |
| 122 | /* Freecom FireWire Hard Drive firmware bug */ | ||
| 123 | if (be32_to_cpu(bus_info_data[3]) >> 8 == OUI_FREECOM_TECHNOLOGIES_GMBH) | ||
| 124 | return 0; | ||
| 125 | |||
| 120 | return (be32_to_cpu(bus_info_data[2]) >> 8) & 0x3; | 126 | return (be32_to_cpu(bus_info_data[2]) >> 8) & 0x3; |
| 121 | } | 127 | } |
| 122 | 128 | ||
| @@ -1685,6 +1691,7 @@ static int nodemgr_host_thread(void *data) | |||
| 1685 | g = get_hpsb_generation(host); | 1691 | g = get_hpsb_generation(host); |
| 1686 | for (i = 0; i < 4 ; i++) { | 1692 | for (i = 0; i < 4 ; i++) { |
| 1687 | msleep_interruptible(63); | 1693 | msleep_interruptible(63); |
| 1694 | try_to_freeze(); | ||
| 1688 | if (kthread_should_stop()) | 1695 | if (kthread_should_stop()) |
| 1689 | goto exit; | 1696 | goto exit; |
| 1690 | 1697 | ||
| @@ -1725,6 +1732,7 @@ static int nodemgr_host_thread(void *data) | |||
| 1725 | /* Sleep 3 seconds */ | 1732 | /* Sleep 3 seconds */ |
| 1726 | for (i = 3000/200; i; i--) { | 1733 | for (i = 3000/200; i; i--) { |
| 1727 | msleep_interruptible(200); | 1734 | msleep_interruptible(200); |
| 1735 | try_to_freeze(); | ||
| 1728 | if (kthread_should_stop()) | 1736 | if (kthread_should_stop()) |
| 1729 | goto exit; | 1737 | goto exit; |
| 1730 | 1738 | ||
diff --git a/drivers/ieee1394/sbp2.c b/drivers/ieee1394/sbp2.c index c52f6e6e8af2..a373c18cf7b8 100644 --- a/drivers/ieee1394/sbp2.c +++ b/drivers/ieee1394/sbp2.c | |||
| @@ -402,6 +402,11 @@ static const struct { | |||
| 402 | }, | 402 | }, |
| 403 | /* iPod mini */ { | 403 | /* iPod mini */ { |
| 404 | .firmware_revision = 0x0a2700, | 404 | .firmware_revision = 0x0a2700, |
| 405 | .model_id = 0x000022, | ||
| 406 | .workarounds = SBP2_WORKAROUND_FIX_CAPACITY, | ||
| 407 | }, | ||
| 408 | /* iPod mini */ { | ||
| 409 | .firmware_revision = 0x0a2700, | ||
| 405 | .model_id = 0x000023, | 410 | .model_id = 0x000023, |
| 406 | .workarounds = SBP2_WORKAROUND_FIX_CAPACITY, | 411 | .workarounds = SBP2_WORKAROUND_FIX_CAPACITY, |
| 407 | }, | 412 | }, |
| @@ -890,12 +895,13 @@ static void sbp2_host_reset(struct hpsb_host *host) | |||
| 890 | return; | 895 | return; |
| 891 | 896 | ||
| 892 | read_lock_irqsave(&sbp2_hi_logical_units_lock, flags); | 897 | read_lock_irqsave(&sbp2_hi_logical_units_lock, flags); |
| 898 | |||
| 893 | list_for_each_entry(lu, &hi->logical_units, lu_list) | 899 | list_for_each_entry(lu, &hi->logical_units, lu_list) |
| 894 | if (likely(atomic_read(&lu->state) != | 900 | if (atomic_cmpxchg(&lu->state, |
| 895 | SBP2LU_STATE_IN_SHUTDOWN)) { | 901 | SBP2LU_STATE_RUNNING, SBP2LU_STATE_IN_RESET) |
| 896 | atomic_set(&lu->state, SBP2LU_STATE_IN_RESET); | 902 | == SBP2LU_STATE_RUNNING) |
| 897 | scsi_block_requests(lu->shost); | 903 | scsi_block_requests(lu->shost); |
| 898 | } | 904 | |
| 899 | read_unlock_irqrestore(&sbp2_hi_logical_units_lock, flags); | 905 | read_unlock_irqrestore(&sbp2_hi_logical_units_lock, flags); |
| 900 | } | 906 | } |
| 901 | 907 | ||
