Lines Matching defs:index

1228 		      __u8 requesttype, __u16 value, __u16 index, void *data,
1238 value, index, data, size,
1255 msg_tag, size, value, index, ret);
1299 int get_registers(struct r8152 *tp, u16 value, u16 index, u16 size, void *data)
1310 value, index, tmp, size, "read");
1323 int set_registers(struct r8152 *tp, u16 value, u16 index, u16 size, void *data)
1334 value, index, tmp, size, "write");
1347 static int generic_ocp_read(struct r8152 *tp, u16 index, u16 size,
1357 if ((size & 3) || !size || (index & 3) || !data)
1360 if ((u32)index + (u32)size > 0xffff)
1365 ret = get_registers(tp, index, type, limit, data);
1369 index += limit;
1373 ret = get_registers(tp, index, type, size, data);
1377 index += size;
1390 static int generic_ocp_write(struct r8152 *tp, u16 index, u16 byteen,
1401 if ((size & 3) || !size || (index & 3) || !data)
1404 if ((u32)index + (u32)size > 0xffff)
1414 ret = set_registers(tp, index, type | byen, 4, data);
1418 index += 4;
1432 ret = set_registers(tp, index,
1438 index += limit;
1442 ret = set_registers(tp, index,
1448 index += size;
1457 ret = set_registers(tp, index, type | byen, 4, data);
1468 int pla_ocp_read(struct r8152 *tp, u16 index, u16 size, void *data)
1470 return generic_ocp_read(tp, index, size, data, MCU_TYPE_PLA);
1474 int pla_ocp_write(struct r8152 *tp, u16 index, u16 byteen, u16 size, void *data)
1476 return generic_ocp_write(tp, index, byteen, size, data, MCU_TYPE_PLA);
1480 int usb_ocp_write(struct r8152 *tp, u16 index, u16 byteen, u16 size, void *data)
1482 return generic_ocp_write(tp, index, byteen, size, data, MCU_TYPE_USB);
1485 static u32 ocp_read_dword(struct r8152 *tp, u16 type, u16 index)
1489 generic_ocp_read(tp, index, sizeof(data), &data, type);
1494 static void ocp_write_dword(struct r8152 *tp, u16 type, u16 index, u32 data)
1498 generic_ocp_write(tp, index, BYTE_EN_DWORD, sizeof(tmp), &tmp, type);
1501 static u16 ocp_read_word(struct r8152 *tp, u16 type, u16 index)
1506 u8 shift = index & 2;
1508 index &= ~3;
1511 generic_ocp_read(tp, index, sizeof(tmp), &tmp, type | byen);
1520 static void ocp_write_word(struct r8152 *tp, u16 type, u16 index, u32 data)
1525 u8 shift = index & 2;
1529 if (index & 2) {
1533 index &= ~3;
1538 generic_ocp_write(tp, index, byen, sizeof(tmp), &tmp, type);
1541 static u8 ocp_read_byte(struct r8152 *tp, u16 type, u16 index)
1545 u8 shift = index & 3;
1547 index &= ~3;
1549 generic_ocp_read(tp, index, sizeof(tmp), &tmp, type);
1558 static void ocp_write_byte(struct r8152 *tp, u16 type, u16 index, u32 data)
1563 u8 shift = index & 3;
1567 if (index & 3) {
1571 index &= ~3;
1576 generic_ocp_write(tp, index, byen, sizeof(tmp), &tmp, type);