/* Return value: SCSI bus speed in units of 100KHz, 1600 is 160 MHz For a 2-byte wide SCSI bus, the maximum transfer speed is twice the maximum transfer rate (e.g. for a wide enabled bus, max 160MHz = max 320MB/sec).  */
static u32 ipr_get_max_scsi_speed(struct ipr_ioa_cfg *ioa_cfg, u8 bus, u8 bus_width)
/* Return value: SCSI bus speed in units of 100KHz, 1600 is 160 MHz For a 2-byte wide SCSI bus, the maximum transfer speed is twice the maximum transfer rate (e.g. for a wide enabled bus, max 160MHz = max 320MB/sec).  */
static u32 ipr_get_max_scsi_speed(struct ipr_ioa_cfg *ioa_cfg, u8 bus, u8 bus_width)
{
	struct ipr_resource_entry *res;
	const struct ipr_ses_table_entry *ste;
	u32 max_xfer_rate = IPR_MAX_SCSI_RATE(bus_width);
	list_for_each_entry(res, &ioa_cfg->used_res_q, queue) {
		if (!(IPR_IS_SES_DEVICE(res->cfgte.std_inq_data)))
			continue;
		if (bus != res->cfgte.res_addr.bus)
			continue;
		if (!(ste = ipr_find_ses_entry(res)))
			continue;
		max_xfer_rate = (ste->max_bus_speed_limit * 10) / (bus_width / 8);
	}
	return max_xfer_rate;
}