ID:368 - Fix handling of bridging-related parameters

1. my_addr is not set if an interface does not expose set_my_addr.
   Currently, the only interface which requires some special handling to set
   my_addr is OpenIPMI. But changing of my_addr still needed for other interfaces.
   So, we must set it regardless of presence of set_my_addr().
2. Since set_my_addr() for serial interfaces only sets my_addr, we remove them
   as redundand.
3. Bridging is enabled when either trasit_addr or target_addr is not 0.
   Currentle transit_addr is not regarded.
4. target_lun does not relate to briging. It is needed for "raw" command. We
   set it regardles of bridging.

Commit for: Dmitry Bazhenov
This commit is contained in:
Zdenek Styblik
2015-07-25 13:03:37 +02:00
parent fb6e311d27
commit c87aa0b96a
3 changed files with 22 additions and 31 deletions

View File

@ -998,13 +998,6 @@ serial_bm_send_request(struct ipmi_intf * intf, struct ipmi_rq * req)
return NULL;
}
int
serial_bm_set_my_addr(struct ipmi_intf * intf, uint8_t addr)
{
intf->my_addr = addr;
return 0;
}
/*
* Serial BM interface
*/
@ -1015,5 +1008,4 @@ struct ipmi_intf ipmi_serial_bm_intf = {
.open = serial_bm_open,
.close = serial_bm_close,
.sendrecv = serial_bm_send_request,
.set_my_addr = serial_bm_set_my_addr
};