USB: ueagle: fix Coding Styles
Fixed coding styles in the ueagle usb driver. Signed-off-by: Javier Blanco de Torres <jblanco@neurowork.net> Signed-off-by: Alejandro Sánchez Acosta <asanchez@neurowork.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
94a82487e6
commit
4545f7eea3
|
@ -94,19 +94,19 @@
|
|||
} while (0)
|
||||
|
||||
#define uea_enters(usb_dev) \
|
||||
uea_vdbg(usb_dev, "entering %s\n", __func__)
|
||||
uea_vdbg(usb_dev, "entering %s\n" , __func__)
|
||||
|
||||
#define uea_leaves(usb_dev) \
|
||||
uea_vdbg(usb_dev, "leaving %s\n", __func__)
|
||||
uea_vdbg(usb_dev, "leaving %s\n" , __func__)
|
||||
|
||||
#define uea_err(usb_dev, format,args...) \
|
||||
dev_err(&(usb_dev)->dev ,"[UEAGLE-ATM] " format , ##args)
|
||||
#define uea_err(usb_dev, format, args...) \
|
||||
dev_err(&(usb_dev)->dev , "[UEAGLE-ATM] " format , ##args)
|
||||
|
||||
#define uea_warn(usb_dev, format,args...) \
|
||||
dev_warn(&(usb_dev)->dev ,"[Ueagle-atm] " format, ##args)
|
||||
#define uea_warn(usb_dev, format, args...) \
|
||||
dev_warn(&(usb_dev)->dev , "[Ueagle-atm] " format, ##args)
|
||||
|
||||
#define uea_info(usb_dev, format,args...) \
|
||||
dev_info(&(usb_dev)->dev ,"[ueagle-atm] " format, ##args)
|
||||
#define uea_info(usb_dev, format, args...) \
|
||||
dev_info(&(usb_dev)->dev , "[ueagle-atm] " format, ##args)
|
||||
|
||||
struct intr_pkt;
|
||||
|
||||
|
@ -289,7 +289,7 @@ enum {
|
|||
#define IS_ISDN(x) \
|
||||
((x)->annex & ANNEXB)
|
||||
|
||||
#define INS_TO_USBDEV(ins) ins->usb_dev
|
||||
#define INS_TO_USBDEV(ins) (ins->usb_dev)
|
||||
|
||||
#define GET_STATUS(data) \
|
||||
((data >> 8) & 0xf)
|
||||
|
@ -304,7 +304,7 @@ enum {
|
|||
* The FW_GET_BYTE() macro is provided only for consistency.
|
||||
*/
|
||||
|
||||
#define FW_GET_BYTE(p) *((__u8 *) (p))
|
||||
#define FW_GET_BYTE(p) (*((__u8 *) (p)))
|
||||
|
||||
#define FW_DIR "ueagle-atm/"
|
||||
#define UEA_FW_NAME_MAX 30
|
||||
|
@ -366,7 +366,7 @@ struct l1_code {
|
|||
u8 string_header[E4_L1_STRING_HEADER];
|
||||
u8 page_number_to_block_index[E4_MAX_PAGE_NUMBER];
|
||||
struct block_index page_header[E4_NO_SWAPPAGE_HEADERS];
|
||||
u8 code [0];
|
||||
u8 code[0];
|
||||
} __attribute__ ((packed));
|
||||
|
||||
/* structures describing a block within a DSP page */
|
||||
|
@ -428,7 +428,8 @@ struct block_info_e4 {
|
|||
#define E4_MODEMREADY 0x1
|
||||
|
||||
#define E1_MAKEFUNCTION(t, s) (((t) & 0xf) << 4 | ((s) & 0xf))
|
||||
#define E4_MAKEFUNCTION(t, st, s) (((t) & 0xf) << 8 | ((st) & 0xf) << 4 | ((s) & 0xf))
|
||||
#define E4_MAKEFUNCTION(t, st, s) (((t) & 0xf) << 8 | \
|
||||
((st) & 0xf) << 4 | ((s) & 0xf))
|
||||
|
||||
#define E1_MAKESA(a, b, c, d) \
|
||||
(((c) & 0xff) << 24 | \
|
||||
|
@ -473,7 +474,7 @@ struct cmv_e4 {
|
|||
__be16 wFunction;
|
||||
__be16 wOffset;
|
||||
__be16 wAddress;
|
||||
__be32 dwData [6];
|
||||
__be32 dwData[6];
|
||||
} __attribute__ ((packed));
|
||||
|
||||
/* structures representing swap information */
|
||||
|
@ -534,11 +535,13 @@ struct intr_pkt {
|
|||
|
||||
static struct usb_driver uea_driver;
|
||||
static DEFINE_MUTEX(uea_mutex);
|
||||
static const char *chip_name[] = {"ADI930", "Eagle I", "Eagle II", "Eagle III", "Eagle IV"};
|
||||
static const char *chip_name[] = {"ADI930", "Eagle I", "Eagle II", "Eagle III",
|
||||
"Eagle IV"};
|
||||
|
||||
static int modem_index;
|
||||
static unsigned int debug;
|
||||
static unsigned int altsetting[NB_MODEM] = {[0 ... (NB_MODEM - 1)] = FASTEST_ISO_INTF};
|
||||
static unsigned int altsetting[NB_MODEM] = {
|
||||
[0 ... (NB_MODEM - 1)] = FASTEST_ISO_INTF};
|
||||
static int sync_wait[NB_MODEM];
|
||||
static char *cmv_file[NB_MODEM];
|
||||
static int annex[NB_MODEM];
|
||||
|
@ -602,7 +605,8 @@ static int uea_send_modem_cmd(struct usb_device *usb,
|
|||
return (ret == size) ? 0 : -EIO;
|
||||
}
|
||||
|
||||
static void uea_upload_pre_firmware(const struct firmware *fw_entry, void *context)
|
||||
static void uea_upload_pre_firmware(const struct firmware *fw_entry,
|
||||
void *context)
|
||||
{
|
||||
struct usb_device *usb = context;
|
||||
const u8 *pfw;
|
||||
|
@ -707,7 +711,8 @@ static int uea_load_firmware(struct usb_device *usb, unsigned int ver)
|
|||
}
|
||||
|
||||
ret = request_firmware_nowait(THIS_MODULE, 1, fw_name, &usb->dev,
|
||||
GFP_KERNEL, usb, uea_upload_pre_firmware);
|
||||
GFP_KERNEL, usb,
|
||||
uea_upload_pre_firmware);
|
||||
if (ret)
|
||||
uea_err(usb, "firmware %s is not available\n", fw_name);
|
||||
else
|
||||
|
@ -994,14 +999,17 @@ static void __uea_load_page_e4(struct uea_softc *sc, u8 pageno, int boot)
|
|||
|
||||
blockidx = &p->page_header[blockno];
|
||||
blocksize = E4_PAGE_BYTES(blockidx->PageSize);
|
||||
blockoffset = sc->dsp_firm->data + le32_to_cpu(blockidx->PageOffset);
|
||||
blockoffset = sc->dsp_firm->data + le32_to_cpu(
|
||||
blockidx->PageOffset);
|
||||
|
||||
bi.dwSize = cpu_to_be32(blocksize);
|
||||
bi.dwAddress = cpu_to_be32(le32_to_cpu(blockidx->PageAddress));
|
||||
|
||||
uea_dbg(INS_TO_USBDEV(sc),
|
||||
"sending block %u for DSP page %u size %u address %x\n",
|
||||
blockno, pageno, blocksize, le32_to_cpu(blockidx->PageAddress));
|
||||
"sending block %u for DSP page "
|
||||
"%u size %u address %x\n",
|
||||
blockno, pageno, blocksize,
|
||||
le32_to_cpu(blockidx->PageAddress));
|
||||
|
||||
/* send block info through the IDMA pipe */
|
||||
if (uea_idma_write(sc, &bi, E4_BLOCK_INFO_SIZE))
|
||||
|
@ -1042,7 +1050,8 @@ static void uea_load_page_e4(struct work_struct *work)
|
|||
|
||||
p = (struct l1_code *) sc->dsp_firm->data;
|
||||
if (pageno >= le16_to_cpu(p->page_header[0].PageNumber)) {
|
||||
uea_err(INS_TO_USBDEV(sc), "invalid DSP page %u requested\n", pageno);
|
||||
uea_err(INS_TO_USBDEV(sc), "invalid DSP "
|
||||
"page %u requested\n", pageno);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1059,7 +1068,7 @@ static void uea_load_page_e4(struct work_struct *work)
|
|||
__uea_load_page_e4(sc, i, 1);
|
||||
}
|
||||
|
||||
uea_dbg(INS_TO_USBDEV(sc),"sending start bi\n");
|
||||
uea_dbg(INS_TO_USBDEV(sc) , "sending start bi\n");
|
||||
|
||||
bi.wHdr = cpu_to_be16(UEA_BIHDR);
|
||||
bi.bBootPage = 0;
|
||||
|
@ -1139,8 +1148,10 @@ static int uea_cmv_e1(struct uea_softc *sc,
|
|||
uea_enters(INS_TO_USBDEV(sc));
|
||||
uea_vdbg(INS_TO_USBDEV(sc), "Function : %d-%d, Address : %c%c%c%c, "
|
||||
"offset : 0x%04x, data : 0x%08x\n",
|
||||
E1_FUNCTION_TYPE(function), E1_FUNCTION_SUBTYPE(function),
|
||||
E1_GETSA1(address), E1_GETSA2(address), E1_GETSA3(address),
|
||||
E1_FUNCTION_TYPE(function),
|
||||
E1_FUNCTION_SUBTYPE(function),
|
||||
E1_GETSA1(address), E1_GETSA2(address),
|
||||
E1_GETSA3(address),
|
||||
E1_GETSA4(address), offset, data);
|
||||
|
||||
/* we send a request, but we expect a reply */
|
||||
|
@ -1157,7 +1168,8 @@ static int uea_cmv_e1(struct uea_softc *sc,
|
|||
cmv.wOffsetAddress = cpu_to_le16(offset);
|
||||
put_unaligned_le32(data >> 16 | data << 16, &cmv.dwData);
|
||||
|
||||
ret = uea_request(sc, UEA_E1_SET_BLOCK, UEA_MPTX_START, sizeof(cmv), &cmv);
|
||||
ret = uea_request(sc, UEA_E1_SET_BLOCK, UEA_MPTX_START,
|
||||
sizeof(cmv), &cmv);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
ret = wait_cmv_ack(sc);
|
||||
|
@ -1191,7 +1203,8 @@ static int uea_cmv_e4(struct uea_softc *sc,
|
|||
cmv.wOffset = cpu_to_be16(offset);
|
||||
cmv.dwData[0] = cpu_to_be32(data);
|
||||
|
||||
ret = uea_request(sc, UEA_E4_SET_BLOCK, UEA_MPTX_START, sizeof(cmv), &cmv);
|
||||
ret = uea_request(sc, UEA_E4_SET_BLOCK, UEA_MPTX_START,
|
||||
sizeof(cmv), &cmv);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
ret = wait_cmv_ack(sc);
|
||||
|
@ -1216,7 +1229,8 @@ static inline int uea_read_cmv_e1(struct uea_softc *sc,
|
|||
static inline int uea_read_cmv_e4(struct uea_softc *sc,
|
||||
u8 size, u16 group, u16 address, u16 offset, u32 *data)
|
||||
{
|
||||
int ret = uea_cmv_e4(sc, E4_MAKEFUNCTION(E4_MEMACCESS, E4_REQUESTREAD, size),
|
||||
int ret = uea_cmv_e4(sc, E4_MAKEFUNCTION(E4_MEMACCESS,
|
||||
E4_REQUESTREAD, size),
|
||||
group, address, offset, 0);
|
||||
if (ret < 0)
|
||||
uea_err(INS_TO_USBDEV(sc),
|
||||
|
@ -1245,7 +1259,8 @@ static inline int uea_write_cmv_e1(struct uea_softc *sc,
|
|||
static inline int uea_write_cmv_e4(struct uea_softc *sc,
|
||||
u8 size, u16 group, u16 address, u16 offset, u32 data)
|
||||
{
|
||||
int ret = uea_cmv_e4(sc, E4_MAKEFUNCTION(E4_MEMACCESS, E4_REQUESTWRITE, size),
|
||||
int ret = uea_cmv_e4(sc, E4_MAKEFUNCTION(E4_MEMACCESS,
|
||||
E4_REQUESTWRITE, size),
|
||||
group, address, offset, data);
|
||||
if (ret < 0)
|
||||
uea_err(INS_TO_USBDEV(sc),
|
||||
|
@ -1446,7 +1461,8 @@ static int uea_stat_e4(struct uea_softc *sc)
|
|||
case 0x1:
|
||||
case 0x3:
|
||||
case 0x4:
|
||||
uea_dbg(INS_TO_USBDEV(sc), "modem not yet synchronized\n");
|
||||
uea_dbg(INS_TO_USBDEV(sc), "modem not yet "
|
||||
"synchronized\n");
|
||||
return 0;
|
||||
case 0x5: /* initialization */
|
||||
case 0x6:
|
||||
|
@ -1455,13 +1471,14 @@ static int uea_stat_e4(struct uea_softc *sc)
|
|||
uea_dbg(INS_TO_USBDEV(sc), "modem initializing\n");
|
||||
return 0;
|
||||
case 0x2: /* fail ... */
|
||||
uea_info(INS_TO_USBDEV(sc), "modem synchronization failed"
|
||||
" (may be try other cmv/dsp)\n");
|
||||
uea_info(INS_TO_USBDEV(sc), "modem synchronization "
|
||||
"failed (may be try other cmv/dsp)\n");
|
||||
return -EAGAIN;
|
||||
case 0x7: /* operational */
|
||||
break;
|
||||
default:
|
||||
uea_warn(INS_TO_USBDEV(sc), "unknown state: %x\n", sc->stats.phy.state);
|
||||
uea_warn(INS_TO_USBDEV(sc), "unknown state: %x\n",
|
||||
sc->stats.phy.state);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1502,9 +1519,9 @@ static int uea_stat_e4(struct uea_softc *sc)
|
|||
if (sc->stats.phy.flags) {
|
||||
uea_dbg(INS_TO_USBDEV(sc), "Stat flag = 0x%x\n",
|
||||
sc->stats.phy.flags);
|
||||
if (sc->stats.phy.flags & 1) //delineation LOSS
|
||||
if (sc->stats.phy.flags & 1) /* delineation LOSS */
|
||||
return -EAGAIN;
|
||||
if (sc->stats.phy.flags & 0x4000) //Reset Flag
|
||||
if (sc->stats.phy.flags & 0x4000) /* Reset Flag */
|
||||
return -EAGAIN;
|
||||
return 0;
|
||||
}
|
||||
|
@ -1618,7 +1635,8 @@ static int request_cmvs(struct uea_softc *sc,
|
|||
if (ret < 0) {
|
||||
/* if caller can handle old version, try to provide it */
|
||||
if (*ver == 1) {
|
||||
uea_warn(INS_TO_USBDEV(sc), "requesting firmware %s failed, "
|
||||
uea_warn(INS_TO_USBDEV(sc), "requesting "
|
||||
"firmware %s failed, "
|
||||
"try to get older cmvs\n", cmv_name);
|
||||
return request_cmvs_old(sc, cmvs, fw);
|
||||
}
|
||||
|
@ -1632,8 +1650,8 @@ static int request_cmvs(struct uea_softc *sc,
|
|||
data = (u8 *) (*fw)->data;
|
||||
if (size < 4 || strncmp(data, "cmv2", 4) != 0) {
|
||||
if (*ver == 1) {
|
||||
uea_warn(INS_TO_USBDEV(sc), "firmware %s is corrupted, "
|
||||
"try to get older cmvs\n", cmv_name);
|
||||
uea_warn(INS_TO_USBDEV(sc), "firmware %s is corrupted,"
|
||||
" try to get older cmvs\n", cmv_name);
|
||||
release_firmware(*fw);
|
||||
return request_cmvs_old(sc, cmvs, fw);
|
||||
}
|
||||
|
@ -1670,7 +1688,7 @@ static int uea_send_cmvs_e1(struct uea_softc *sc)
|
|||
int i, ret, len;
|
||||
void *cmvs_ptr;
|
||||
const struct firmware *cmvs_fw;
|
||||
int ver = 1; // we can handle v1 cmv firmware version;
|
||||
int ver = 1; /* we can handle v1 cmv firmware version; */
|
||||
|
||||
/* Enter in R-IDLE (cmv) until instructed otherwise */
|
||||
ret = uea_write_cmv_e1(sc, E1_SA_CNTL, 0, 1);
|
||||
|
@ -1697,7 +1715,8 @@ static int uea_send_cmvs_e1(struct uea_softc *sc)
|
|||
"please update your firmware\n");
|
||||
|
||||
for (i = 0; i < len; i++) {
|
||||
ret = uea_write_cmv_e1(sc, get_unaligned_le32(&cmvs_v1[i].address),
|
||||
ret = uea_write_cmv_e1(sc,
|
||||
get_unaligned_le32(&cmvs_v1[i].address),
|
||||
get_unaligned_le16(&cmvs_v1[i].offset),
|
||||
get_unaligned_le32(&cmvs_v1[i].data));
|
||||
if (ret < 0)
|
||||
|
@ -1707,7 +1726,8 @@ static int uea_send_cmvs_e1(struct uea_softc *sc)
|
|||
struct uea_cmvs_v2 *cmvs_v2 = cmvs_ptr;
|
||||
|
||||
for (i = 0; i < len; i++) {
|
||||
ret = uea_write_cmv_e1(sc, get_unaligned_le32(&cmvs_v2[i].address),
|
||||
ret = uea_write_cmv_e1(sc,
|
||||
get_unaligned_le32(&cmvs_v2[i].address),
|
||||
(u16) get_unaligned_le32(&cmvs_v2[i].offset),
|
||||
get_unaligned_le32(&cmvs_v2[i].data));
|
||||
if (ret < 0)
|
||||
|
@ -1722,7 +1742,8 @@ static int uea_send_cmvs_e1(struct uea_softc *sc)
|
|||
/* Enter in R-ACT-REQ */
|
||||
ret = uea_write_cmv_e1(sc, E1_SA_CNTL, 0, 2);
|
||||
uea_vdbg(INS_TO_USBDEV(sc), "Entering in R-ACT-REQ state\n");
|
||||
uea_info(INS_TO_USBDEV(sc), "modem started, waiting synchronization...\n");
|
||||
uea_info(INS_TO_USBDEV(sc), "modem started, waiting "
|
||||
"synchronization...\n");
|
||||
out:
|
||||
release_firmware(cmvs_fw);
|
||||
return ret;
|
||||
|
@ -1733,7 +1754,7 @@ static int uea_send_cmvs_e4(struct uea_softc *sc)
|
|||
int i, ret, len;
|
||||
void *cmvs_ptr;
|
||||
const struct firmware *cmvs_fw;
|
||||
int ver = 2; // we can only handle v2 cmv firmware version;
|
||||
int ver = 2; /* we can only handle v2 cmv firmware version; */
|
||||
|
||||
/* Enter in R-IDLE (cmv) until instructed otherwise */
|
||||
ret = uea_write_cmv_e4(sc, 1, E4_SA_CNTL, 0, 0, 1);
|
||||
|
@ -1776,7 +1797,8 @@ static int uea_send_cmvs_e4(struct uea_softc *sc)
|
|||
/* Enter in R-ACT-REQ */
|
||||
ret = uea_write_cmv_e4(sc, 1, E4_SA_CNTL, 0, 0, 2);
|
||||
uea_vdbg(INS_TO_USBDEV(sc), "Entering in R-ACT-REQ state\n");
|
||||
uea_info(INS_TO_USBDEV(sc), "modem started, waiting synchronization...\n");
|
||||
uea_info(INS_TO_USBDEV(sc), "modem started, waiting "
|
||||
"synchronization...\n");
|
||||
out:
|
||||
release_firmware(cmvs_fw);
|
||||
return ret;
|
||||
|
@ -1835,9 +1857,11 @@ static int uea_start_reset(struct uea_softc *sc)
|
|||
return ret;
|
||||
|
||||
if (UEA_CHIP_VERSION(sc) == EAGLE_IV)
|
||||
sc->cmv_dsc.e4.function = E4_MAKEFUNCTION(E4_ADSLDIRECTIVE, E4_MODEMREADY, 1);
|
||||
sc->cmv_dsc.e4.function = E4_MAKEFUNCTION(E4_ADSLDIRECTIVE,
|
||||
E4_MODEMREADY, 1);
|
||||
else
|
||||
sc->cmv_dsc.e1.function = E1_MAKEFUNCTION(E1_ADSLDIRECTIVE, E1_MODEMREADY);
|
||||
sc->cmv_dsc.e1.function = E1_MAKEFUNCTION(E1_ADSLDIRECTIVE,
|
||||
E1_MODEMREADY);
|
||||
|
||||
/* demask interrupt */
|
||||
sc->booting = 0;
|
||||
|
@ -1937,7 +1961,8 @@ static int load_XILINX_firmware(struct uea_softc *sc)
|
|||
value = 0;
|
||||
ret = uea_send_modem_cmd(sc->usb_dev, 0xe, 1, &value);
|
||||
if (ret < 0)
|
||||
uea_err(sc->usb_dev, "elsa de-assert failed with error %d\n", ret);
|
||||
uea_err(sc->usb_dev, "elsa de-assert failed with error"
|
||||
" %d\n", ret);
|
||||
|
||||
err1:
|
||||
release_firmware(fw_entry);
|
||||
|
@ -1966,13 +1991,15 @@ static void uea_dispatch_cmv_e1(struct uea_softc *sc, struct intr_pkt *intr)
|
|||
if (UEA_CHIP_VERSION(sc) == ADI930
|
||||
&& cmv->bFunction == E1_MAKEFUNCTION(2, 2)) {
|
||||
cmv->wIndex = cpu_to_le16(dsc->idx);
|
||||
put_unaligned_le32(dsc->address, &cmv->dwSymbolicAddress);
|
||||
put_unaligned_le32(dsc->address,
|
||||
&cmv->dwSymbolicAddress);
|
||||
cmv->wOffsetAddress = cpu_to_le16(dsc->offset);
|
||||
} else
|
||||
goto bad2;
|
||||
}
|
||||
|
||||
if (cmv->bFunction == E1_MAKEFUNCTION(E1_ADSLDIRECTIVE, E1_MODEMREADY)) {
|
||||
if (cmv->bFunction == E1_MAKEFUNCTION(E1_ADSLDIRECTIVE,
|
||||
E1_MODEMREADY)) {
|
||||
wake_up_cmv_ack(sc);
|
||||
uea_leaves(INS_TO_USBDEV(sc));
|
||||
return;
|
||||
|
@ -2021,7 +2048,8 @@ static void uea_dispatch_cmv_e4(struct uea_softc *sc, struct intr_pkt *intr)
|
|||
if (be16_to_cpu(cmv->wFunction) != dsc->function)
|
||||
goto bad2;
|
||||
|
||||
if (be16_to_cpu(cmv->wFunction) == E4_MAKEFUNCTION(E4_ADSLDIRECTIVE, E4_MODEMREADY, 1)) {
|
||||
if (be16_to_cpu(cmv->wFunction) == E4_MAKEFUNCTION(E4_ADSLDIRECTIVE,
|
||||
E4_MODEMREADY, 1)) {
|
||||
wake_up_cmv_ack(sc);
|
||||
uea_leaves(INS_TO_USBDEV(sc));
|
||||
return;
|
||||
|
@ -2048,14 +2076,16 @@ bad2:
|
|||
return;
|
||||
}
|
||||
|
||||
static void uea_schedule_load_page_e1(struct uea_softc *sc, struct intr_pkt *intr)
|
||||
static void uea_schedule_load_page_e1(struct uea_softc *sc,
|
||||
struct intr_pkt *intr)
|
||||
{
|
||||
sc->pageno = intr->e1_bSwapPageNo;
|
||||
sc->ovl = intr->e1_bOvl >> 4 | intr->e1_bOvl << 4;
|
||||
queue_work(sc->work_q, &sc->task);
|
||||
}
|
||||
|
||||
static void uea_schedule_load_page_e4(struct uea_softc *sc, struct intr_pkt *intr)
|
||||
static void uea_schedule_load_page_e4(struct uea_softc *sc,
|
||||
struct intr_pkt *intr)
|
||||
{
|
||||
sc->pageno = intr->e4_bSwapPageNo;
|
||||
queue_work(sc->work_q, &sc->task);
|
||||
|
@ -2263,8 +2293,8 @@ out:
|
|||
|
||||
static DEVICE_ATTR(stat_status, S_IWUGO | S_IRUGO, read_status, reboot);
|
||||
|
||||
static ssize_t read_human_status(struct device *dev, struct device_attribute *attr,
|
||||
char *buf)
|
||||
static ssize_t read_human_status(struct device *dev,
|
||||
struct device_attribute *attr, char *buf)
|
||||
{
|
||||
int ret = -ENODEV;
|
||||
int modem_state;
|
||||
|
@ -2324,7 +2354,8 @@ out:
|
|||
return ret;
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(stat_human_status, S_IWUGO | S_IRUGO, read_human_status, NULL);
|
||||
static DEVICE_ATTR(stat_human_status, S_IWUGO | S_IRUGO,
|
||||
read_human_status, NULL);
|
||||
|
||||
static ssize_t read_delin(struct device *dev, struct device_attribute *attr,
|
||||
char *buf)
|
||||
|
@ -2527,12 +2558,14 @@ static int uea_bind(struct usbatm_data *usbatm, struct usb_interface *intf,
|
|||
else if (sc->driver_info & AUTO_ANNEX_B)
|
||||
sc->annex = ANNEXB;
|
||||
else
|
||||
sc->annex = (le16_to_cpu(sc->usb_dev->descriptor.bcdDevice) & 0x80)?ANNEXB:ANNEXA;
|
||||
sc->annex = (le16_to_cpu
|
||||
(sc->usb_dev->descriptor.bcdDevice) & 0x80) ? ANNEXB : ANNEXA;
|
||||
|
||||
alt = altsetting[sc->modem_index];
|
||||
/* ADI930 don't support iso */
|
||||
if (UEA_CHIP_VERSION(id) != ADI930 && alt > 0) {
|
||||
if (alt <= 8 && usb_set_interface(usb, UEA_DS_IFACE_NO, alt) == 0) {
|
||||
if (alt <= 8 &&
|
||||
usb_set_interface(usb, UEA_DS_IFACE_NO, alt) == 0) {
|
||||
uea_dbg(usb, "set alternate %u for 2 interface\n", alt);
|
||||
uea_info(usb, "using iso mode\n");
|
||||
usbatm->flags |= UDSL_USE_ISOC | UDSL_IGNORE_EILSEQ;
|
||||
|
@ -2621,40 +2654,74 @@ static void uea_disconnect(struct usb_interface *intf)
|
|||
* List of supported VID/PID
|
||||
*/
|
||||
static const struct usb_device_id uea_ids[] = {
|
||||
{USB_DEVICE(ANALOG_VID, ADI930_PID_PREFIRM), .driver_info = ADI930 | PREFIRM},
|
||||
{USB_DEVICE(ANALOG_VID, ADI930_PID_PSTFIRM), .driver_info = ADI930 | PSTFIRM},
|
||||
{USB_DEVICE(ANALOG_VID, EAGLE_I_PID_PREFIRM), .driver_info = EAGLE_I | PREFIRM},
|
||||
{USB_DEVICE(ANALOG_VID, EAGLE_I_PID_PSTFIRM), .driver_info = EAGLE_I | PSTFIRM},
|
||||
{USB_DEVICE(ANALOG_VID, EAGLE_II_PID_PREFIRM), .driver_info = EAGLE_II | PREFIRM},
|
||||
{USB_DEVICE(ANALOG_VID, EAGLE_II_PID_PSTFIRM), .driver_info = EAGLE_II | PSTFIRM},
|
||||
{USB_DEVICE(ANALOG_VID, EAGLE_IIC_PID_PREFIRM), .driver_info = EAGLE_II | PREFIRM},
|
||||
{USB_DEVICE(ANALOG_VID, EAGLE_IIC_PID_PSTFIRM), .driver_info = EAGLE_II | PSTFIRM},
|
||||
{USB_DEVICE(ANALOG_VID, EAGLE_III_PID_PREFIRM), .driver_info = EAGLE_III | PREFIRM},
|
||||
{USB_DEVICE(ANALOG_VID, EAGLE_III_PID_PSTFIRM), .driver_info = EAGLE_III | PSTFIRM},
|
||||
{USB_DEVICE(ANALOG_VID, EAGLE_IV_PID_PREFIRM), .driver_info = EAGLE_IV | PREFIRM},
|
||||
{USB_DEVICE(ANALOG_VID, EAGLE_IV_PID_PSTFIRM), .driver_info = EAGLE_IV | PSTFIRM},
|
||||
{USB_DEVICE(DEVOLO_VID, DEVOLO_EAGLE_I_A_PID_PREFIRM), .driver_info = EAGLE_I | PREFIRM},
|
||||
{USB_DEVICE(DEVOLO_VID, DEVOLO_EAGLE_I_A_PID_PSTFIRM), .driver_info = EAGLE_I | PSTFIRM | AUTO_ANNEX_A},
|
||||
{USB_DEVICE(DEVOLO_VID, DEVOLO_EAGLE_I_B_PID_PREFIRM), .driver_info = EAGLE_I | PREFIRM},
|
||||
{USB_DEVICE(DEVOLO_VID, DEVOLO_EAGLE_I_B_PID_PSTFIRM), .driver_info = EAGLE_I | PSTFIRM | AUTO_ANNEX_B},
|
||||
{USB_DEVICE(DEVOLO_VID, DEVOLO_EAGLE_II_A_PID_PREFIRM), .driver_info = EAGLE_II | PREFIRM},
|
||||
{USB_DEVICE(DEVOLO_VID, DEVOLO_EAGLE_II_A_PID_PSTFIRM), .driver_info = EAGLE_II | PSTFIRM | AUTO_ANNEX_A},
|
||||
{USB_DEVICE(DEVOLO_VID, DEVOLO_EAGLE_II_B_PID_PREFIRM), .driver_info = EAGLE_II | PREFIRM},
|
||||
{USB_DEVICE(DEVOLO_VID, DEVOLO_EAGLE_II_B_PID_PSTFIRM), .driver_info = EAGLE_II | PSTFIRM | AUTO_ANNEX_B},
|
||||
{USB_DEVICE(ELSA_VID, ELSA_PID_PREFIRM), .driver_info = ADI930 | PREFIRM},
|
||||
{USB_DEVICE(ELSA_VID, ELSA_PID_PSTFIRM), .driver_info = ADI930 | PSTFIRM},
|
||||
{USB_DEVICE(ELSA_VID, ELSA_PID_A_PREFIRM), .driver_info = ADI930 | PREFIRM},
|
||||
{USB_DEVICE(ELSA_VID, ELSA_PID_A_PSTFIRM), .driver_info = ADI930 | PSTFIRM | AUTO_ANNEX_A},
|
||||
{USB_DEVICE(ELSA_VID, ELSA_PID_B_PREFIRM), .driver_info = ADI930 | PREFIRM},
|
||||
{USB_DEVICE(ELSA_VID, ELSA_PID_B_PSTFIRM), .driver_info = ADI930 | PSTFIRM | AUTO_ANNEX_B},
|
||||
{USB_DEVICE(USR_VID, MILLER_A_PID_PREFIRM), .driver_info = EAGLE_I | PREFIRM},
|
||||
{USB_DEVICE(USR_VID, MILLER_A_PID_PSTFIRM), .driver_info = EAGLE_I | PSTFIRM | AUTO_ANNEX_A},
|
||||
{USB_DEVICE(USR_VID, MILLER_B_PID_PREFIRM), .driver_info = EAGLE_I | PREFIRM},
|
||||
{USB_DEVICE(USR_VID, MILLER_B_PID_PSTFIRM), .driver_info = EAGLE_I | PSTFIRM | AUTO_ANNEX_B},
|
||||
{USB_DEVICE(USR_VID, HEINEKEN_A_PID_PREFIRM),.driver_info = EAGLE_I | PREFIRM},
|
||||
{USB_DEVICE(USR_VID, HEINEKEN_A_PID_PSTFIRM),.driver_info = EAGLE_I | PSTFIRM | AUTO_ANNEX_A},
|
||||
{USB_DEVICE(USR_VID, HEINEKEN_B_PID_PREFIRM),.driver_info = EAGLE_I | PREFIRM},
|
||||
{USB_DEVICE(USR_VID, HEINEKEN_B_PID_PSTFIRM),.driver_info = EAGLE_I | PSTFIRM | AUTO_ANNEX_B},
|
||||
{USB_DEVICE(ANALOG_VID, ADI930_PID_PREFIRM),
|
||||
.driver_info = ADI930 | PREFIRM},
|
||||
{USB_DEVICE(ANALOG_VID, ADI930_PID_PSTFIRM),
|
||||
.driver_info = ADI930 | PSTFIRM},
|
||||
{USB_DEVICE(ANALOG_VID, EAGLE_I_PID_PREFIRM),
|
||||
.driver_info = EAGLE_I | PREFIRM},
|
||||
{USB_DEVICE(ANALOG_VID, EAGLE_I_PID_PSTFIRM),
|
||||
.driver_info = EAGLE_I | PSTFIRM},
|
||||
{USB_DEVICE(ANALOG_VID, EAGLE_II_PID_PREFIRM),
|
||||
.driver_info = EAGLE_II | PREFIRM},
|
||||
{USB_DEVICE(ANALOG_VID, EAGLE_II_PID_PSTFIRM),
|
||||
.driver_info = EAGLE_II | PSTFIRM},
|
||||
{USB_DEVICE(ANALOG_VID, EAGLE_IIC_PID_PREFIRM),
|
||||
.driver_info = EAGLE_II | PREFIRM},
|
||||
{USB_DEVICE(ANALOG_VID, EAGLE_IIC_PID_PSTFIRM),
|
||||
.driver_info = EAGLE_II | PSTFIRM},
|
||||
{USB_DEVICE(ANALOG_VID, EAGLE_III_PID_PREFIRM),
|
||||
.driver_info = EAGLE_III | PREFIRM},
|
||||
{USB_DEVICE(ANALOG_VID, EAGLE_III_PID_PSTFIRM),
|
||||
.driver_info = EAGLE_III | PSTFIRM},
|
||||
{USB_DEVICE(ANALOG_VID, EAGLE_IV_PID_PREFIRM),
|
||||
.driver_info = EAGLE_IV | PREFIRM},
|
||||
{USB_DEVICE(ANALOG_VID, EAGLE_IV_PID_PSTFIRM),
|
||||
.driver_info = EAGLE_IV | PSTFIRM},
|
||||
{USB_DEVICE(DEVOLO_VID, DEVOLO_EAGLE_I_A_PID_PREFIRM),
|
||||
.driver_info = EAGLE_I | PREFIRM},
|
||||
{USB_DEVICE(DEVOLO_VID, DEVOLO_EAGLE_I_A_PID_PSTFIRM),
|
||||
.driver_info = EAGLE_I | PSTFIRM | AUTO_ANNEX_A},
|
||||
{USB_DEVICE(DEVOLO_VID, DEVOLO_EAGLE_I_B_PID_PREFIRM),
|
||||
.driver_info = EAGLE_I | PREFIRM},
|
||||
{USB_DEVICE(DEVOLO_VID, DEVOLO_EAGLE_I_B_PID_PSTFIRM),
|
||||
.driver_info = EAGLE_I | PSTFIRM | AUTO_ANNEX_B},
|
||||
{USB_DEVICE(DEVOLO_VID, DEVOLO_EAGLE_II_A_PID_PREFIRM),
|
||||
.driver_info = EAGLE_II | PREFIRM},
|
||||
{USB_DEVICE(DEVOLO_VID, DEVOLO_EAGLE_II_A_PID_PSTFIRM),
|
||||
.driver_info = EAGLE_II | PSTFIRM | AUTO_ANNEX_A},
|
||||
{USB_DEVICE(DEVOLO_VID, DEVOLO_EAGLE_II_B_PID_PREFIRM),
|
||||
.driver_info = EAGLE_II | PREFIRM},
|
||||
{USB_DEVICE(DEVOLO_VID, DEVOLO_EAGLE_II_B_PID_PSTFIRM),
|
||||
.driver_info = EAGLE_II | PSTFIRM | AUTO_ANNEX_B},
|
||||
{USB_DEVICE(ELSA_VID, ELSA_PID_PREFIRM),
|
||||
.driver_info = ADI930 | PREFIRM},
|
||||
{USB_DEVICE(ELSA_VID, ELSA_PID_PSTFIRM),
|
||||
.driver_info = ADI930 | PSTFIRM},
|
||||
{USB_DEVICE(ELSA_VID, ELSA_PID_A_PREFIRM),
|
||||
.driver_info = ADI930 | PREFIRM},
|
||||
{USB_DEVICE(ELSA_VID, ELSA_PID_A_PSTFIRM),
|
||||
.driver_info = ADI930 | PSTFIRM | AUTO_ANNEX_A},
|
||||
{USB_DEVICE(ELSA_VID, ELSA_PID_B_PREFIRM),
|
||||
.driver_info = ADI930 | PREFIRM},
|
||||
{USB_DEVICE(ELSA_VID, ELSA_PID_B_PSTFIRM),
|
||||
.driver_info = ADI930 | PSTFIRM | AUTO_ANNEX_B},
|
||||
{USB_DEVICE(USR_VID, MILLER_A_PID_PREFIRM),
|
||||
.driver_info = EAGLE_I | PREFIRM},
|
||||
{USB_DEVICE(USR_VID, MILLER_A_PID_PSTFIRM),
|
||||
.driver_info = EAGLE_I | PSTFIRM | AUTO_ANNEX_A},
|
||||
{USB_DEVICE(USR_VID, MILLER_B_PID_PREFIRM),
|
||||
.driver_info = EAGLE_I | PREFIRM},
|
||||
{USB_DEVICE(USR_VID, MILLER_B_PID_PSTFIRM),
|
||||
.driver_info = EAGLE_I | PSTFIRM | AUTO_ANNEX_B},
|
||||
{USB_DEVICE(USR_VID, HEINEKEN_A_PID_PREFIRM),
|
||||
.driver_info = EAGLE_I | PREFIRM},
|
||||
{USB_DEVICE(USR_VID, HEINEKEN_A_PID_PSTFIRM),
|
||||
.driver_info = EAGLE_I | PSTFIRM | AUTO_ANNEX_A},
|
||||
{USB_DEVICE(USR_VID, HEINEKEN_B_PID_PREFIRM),
|
||||
.driver_info = EAGLE_I | PREFIRM},
|
||||
{USB_DEVICE(USR_VID, HEINEKEN_B_PID_PSTFIRM),
|
||||
.driver_info = EAGLE_I | PSTFIRM | AUTO_ANNEX_B},
|
||||
{}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue