Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6:
ieee1394: sbp2: fix race condition in state change
ieee1394: fix list corruption (reported at module removal)
firewire: fw-sbp2: another iPod mini quirk entry
ieee1394: sbp2: another iPod mini quirk entry

+31 -17
+5
drivers/firewire/fw-sbp2.c
··· 372 }, 373 /* iPod mini */ { 374 .firmware_revision = 0x0a2700, 375 .model = 0x000023, 376 .workarounds = SBP2_WORKAROUND_FIX_CAPACITY, 377 },
··· 372 }, 373 /* iPod mini */ { 374 .firmware_revision = 0x0a2700, 375 + .model = 0x000022, 376 + .workarounds = SBP2_WORKAROUND_FIX_CAPACITY, 377 + }, 378 + /* iPod mini */ { 379 + .firmware_revision = 0x0a2700, 380 .model = 0x000023, 381 .workarounds = SBP2_WORKAROUND_FIX_CAPACITY, 382 },
+12 -13
drivers/ieee1394/highlevel.c
··· 46 47 static DEFINE_RWLOCK(addr_space_lock); 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 54 static struct hl_host_info *hl_get_hostinfo(struct hpsb_highlevel *hl, 55 struct hpsb_host *host) ··· 477 return retval; 478 } 479 480 static void init_hpsb_highlevel(struct hpsb_host *host) 481 { 482 - INIT_LIST_HEAD(&dummy_zero_addr.host_list); 483 - INIT_LIST_HEAD(&dummy_zero_addr.hl_list); 484 - INIT_LIST_HEAD(&dummy_max_addr.host_list); 485 - INIT_LIST_HEAD(&dummy_max_addr.hl_list); 486 487 - dummy_zero_addr.op = dummy_max_addr.op = &dummy_ops; 488 489 - dummy_zero_addr.start = dummy_zero_addr.end = 0; 490 - dummy_max_addr.start = dummy_max_addr.end = ((u64) 1) << 48; 491 492 - list_add_tail(&dummy_zero_addr.host_list, &host->addr_space); 493 - list_add_tail(&dummy_max_addr.host_list, &host->addr_space); 494 } 495 496 void highlevel_add_host(struct hpsb_host *host)
··· 46 47 static DEFINE_RWLOCK(addr_space_lock); 48 49 50 static struct hl_host_info *hl_get_hostinfo(struct hpsb_highlevel *hl, 51 struct hpsb_host *host) ··· 481 return retval; 482 } 483 484 + static struct hpsb_address_ops dummy_ops; 485 + 486 + /* dummy address spaces as lower and upper bounds of the host's a.s. list */ 487 static void init_hpsb_highlevel(struct hpsb_host *host) 488 { 489 + INIT_LIST_HEAD(&host->dummy_zero_addr.host_list); 490 + INIT_LIST_HEAD(&host->dummy_zero_addr.hl_list); 491 + INIT_LIST_HEAD(&host->dummy_max_addr.host_list); 492 + INIT_LIST_HEAD(&host->dummy_max_addr.hl_list); 493 494 + host->dummy_zero_addr.op = host->dummy_max_addr.op = &dummy_ops; 495 496 + host->dummy_zero_addr.start = host->dummy_zero_addr.end = 0; 497 + host->dummy_max_addr.start = host->dummy_max_addr.end = ((u64) 1) << 48; 498 499 + list_add_tail(&host->dummy_zero_addr.host_list, &host->addr_space); 500 + list_add_tail(&host->dummy_max_addr.host_list, &host->addr_space); 501 } 502 503 void highlevel_add_host(struct hpsb_host *host)
+4
drivers/ieee1394/hosts.h
··· 13 14 #include "ieee1394_types.h" 15 #include "csr.h" 16 17 struct hpsb_packet; 18 struct hpsb_iso; ··· 73 struct { DECLARE_BITMAP(map, 64); } tl_pool[ALL_NODES]; 74 75 struct csr_control csr; 76 }; 77 78 enum devctl_cmd {
··· 13 14 #include "ieee1394_types.h" 15 #include "csr.h" 16 + #include "highlevel.h" 17 18 struct hpsb_packet; 19 struct hpsb_iso; ··· 72 struct { DECLARE_BITMAP(map, 64); } tl_pool[ALL_NODES]; 73 74 struct csr_control csr; 75 + 76 + struct hpsb_address_serve dummy_zero_addr; 77 + struct hpsb_address_serve dummy_max_addr; 78 }; 79 80 enum devctl_cmd {
+10 -4
drivers/ieee1394/sbp2.c
··· 402 }, 403 /* iPod mini */ { 404 .firmware_revision = 0x0a2700, 405 .model_id = 0x000023, 406 .workarounds = SBP2_WORKAROUND_FIX_CAPACITY, 407 }, ··· 895 return; 896 897 read_lock_irqsave(&sbp2_hi_logical_units_lock, flags); 898 list_for_each_entry(lu, &hi->logical_units, lu_list) 899 - if (likely(atomic_read(&lu->state) != 900 - SBP2LU_STATE_IN_SHUTDOWN)) { 901 - atomic_set(&lu->state, SBP2LU_STATE_IN_RESET); 902 scsi_block_requests(lu->shost); 903 - } 904 read_unlock_irqrestore(&sbp2_hi_logical_units_lock, flags); 905 } 906
··· 402 }, 403 /* iPod mini */ { 404 .firmware_revision = 0x0a2700, 405 + .model_id = 0x000022, 406 + .workarounds = SBP2_WORKAROUND_FIX_CAPACITY, 407 + }, 408 + /* iPod mini */ { 409 + .firmware_revision = 0x0a2700, 410 .model_id = 0x000023, 411 .workarounds = SBP2_WORKAROUND_FIX_CAPACITY, 412 }, ··· 890 return; 891 892 read_lock_irqsave(&sbp2_hi_logical_units_lock, flags); 893 + 894 list_for_each_entry(lu, &hi->logical_units, lu_list) 895 + if (atomic_cmpxchg(&lu->state, 896 + SBP2LU_STATE_RUNNING, SBP2LU_STATE_IN_RESET) 897 + == SBP2LU_STATE_RUNNING) 898 scsi_block_requests(lu->shost); 899 + 900 read_unlock_irqrestore(&sbp2_hi_logical_units_lock, flags); 901 } 902