Date: Sat, 18 Feb 2012 21:35:49 +0000 From: Chris Boot Subject: firewire: sbp2: Initialise sbp2_orb->rcode for management ORBs When sending ORBs the struct sbp2_orb->rcode field should be initialised to -1 otherwise complete_transaction() assumes the request is successful (RCODE_COMPLETE is 0). When sending managament ORBs, such as LOGIN or LOGOUT, this was not done and so the initiator would wait for the request to time out before trying again. Without this, LOGINs are only retried when the management ORB times out, rather than the initiator noticing an error occurred and retrying soon after. For targets that advertise more than one LUN per unit, and can only accept one management request at a time, this means LUNs are only logged in one per timeout period. Signed-off-by: Chris Boot --- drivers/firewire/sbp2.c | 3 +++ 1 file changed, 3 insertions(+) --- a/drivers/firewire/sbp2.c +++ b/drivers/firewire/sbp2.c @@ -580,6 +580,9 @@ static int sbp2_send_management_orb(stru if (dma_mapping_error(device->card->device, orb->response_bus)) goto fail_mapping_response; + /* Initialize rcode to something not RCODE_COMPLETE. */ + orb->base.rcode = -1; + orb->request.response.high = 0; orb->request.response.low = cpu_to_be32(orb->response_bus);