aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ieee1394
diff options
context:
space:
mode:
authorBen Collins <bcollins@ubuntu.com>2006-06-12 18:15:20 -0400
committerBen Collins <bcollins@ubuntu.com>2006-06-12 18:15:20 -0400
commite269d276792684a13ab0d9acd8c024ec7d6c5f4d (patch)
tree18d02851685f4e458a52984e290ced6aaa976998 /drivers/ieee1394
parent02f4213fc43dbddc3a3ab9fa4d2dc2501a2d30dc (diff)
sbp2: fix deregistration of status fifo address space
The proper designator of an invalid CSR address is ~(u64)0, not (u64)0. Use the correct value in initialization and deregistration. Also, scsi_id->sbp2_lun does not need to be initialized twice. (scsi_id was kzalloc'd.) Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Ben Collins <bcollins@ubuntu.com>
Diffstat (limited to 'drivers/ieee1394')
-rw-r--r--drivers/ieee1394/sbp2.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/ieee1394/sbp2.c b/drivers/ieee1394/sbp2.c
index 251656ec7d92..975a56bfab3d 100644
--- a/drivers/ieee1394/sbp2.c
+++ b/drivers/ieee1394/sbp2.c
@@ -794,12 +794,12 @@ static struct scsi_id_instance_data *sbp2_alloc_device(struct unit_directory *ud
794 scsi_id->ud = ud; 794 scsi_id->ud = ud;
795 scsi_id->speed_code = IEEE1394_SPEED_100; 795 scsi_id->speed_code = IEEE1394_SPEED_100;
796 scsi_id->max_payload_size = sbp2_speedto_max_payload[IEEE1394_SPEED_100]; 796 scsi_id->max_payload_size = sbp2_speedto_max_payload[IEEE1394_SPEED_100];
797 scsi_id->status_fifo_addr = ~0ULL;
797 atomic_set(&scsi_id->sbp2_login_complete, 0); 798 atomic_set(&scsi_id->sbp2_login_complete, 0);
798 INIT_LIST_HEAD(&scsi_id->sbp2_command_orb_inuse); 799 INIT_LIST_HEAD(&scsi_id->sbp2_command_orb_inuse);
799 INIT_LIST_HEAD(&scsi_id->sbp2_command_orb_completed); 800 INIT_LIST_HEAD(&scsi_id->sbp2_command_orb_completed);
800 INIT_LIST_HEAD(&scsi_id->scsi_list); 801 INIT_LIST_HEAD(&scsi_id->scsi_list);
801 spin_lock_init(&scsi_id->sbp2_command_orb_lock); 802 spin_lock_init(&scsi_id->sbp2_command_orb_lock);
802 scsi_id->sbp2_lun = 0;
803 803
804 ud->device.driver_data = scsi_id; 804 ud->device.driver_data = scsi_id;
805 805
@@ -1090,7 +1090,7 @@ static void sbp2_remove_device(struct scsi_id_instance_data *scsi_id)
1090 SBP2_DMA_FREE("single query logins data"); 1090 SBP2_DMA_FREE("single query logins data");
1091 } 1091 }
1092 1092
1093 if (scsi_id->status_fifo_addr) 1093 if (scsi_id->status_fifo_addr != ~0ULL)
1094 hpsb_unregister_addrspace(&sbp2_highlevel, hi->host, 1094 hpsb_unregister_addrspace(&sbp2_highlevel, hi->host,
1095 scsi_id->status_fifo_addr); 1095 scsi_id->status_fifo_addr);
1096 1096