Commit 62fb45d3 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

USB: ch9: add "USB_" prefix in front of TEST defines

For some reason, the TEST_ defines in the usb/ch9.h files did not have
the USB_ prefix on it, making it a bit confusing when reading the file,
as well as not the nicest thing to do in a uapi file.

So fix that up and add the USB_ prefix on to them, and fix up all
in-kernel usages.  This included deleting the duplicate copy in the
net2272.h file.

Cc: Felipe Balbi <balbi@kernel.org>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Mathias Nyman <mathias.nyman@intel.com>
Cc: Pawel Laszczak <pawell@cadence.com>
Cc: YueHaibing <yuehaibing@huawei.com>
Cc: Nathan Chancellor <natechancellor@gmail.com>
Cc: Jason Yan <yanaijie@huawei.com>
Cc: Jia-Ju Bai <baijiaju1990@gmail.com>
Cc: Stephen Boyd <swboyd@chromium.org>
Cc: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Jules Irenge <jbi.octave@gmail.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Cc: Rob Gill <rrobgill@protonmail.com>
Cc: Macpaul Lin <macpaul.lin@mediatek.com>
Acked-by: default avatarMinas Harutyunyan <hminas@synopsys.com>
Acked-by: default avatarBin Liu <b-liu@ti.com>
Acked-by: default avatarChunfeng Yun <chunfeng.yun@mediatek.com>
Acked-by: default avatarPeter Chen <peter.chen@nxp.com>
Link: https://lore.kernel.org/r/20200618144206.2655890-1-gregkh@linuxfoundation.orgSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f8f02d5c
...@@ -328,10 +328,10 @@ static int cdns3_ep0_feature_handle_device(struct cdns3_device *priv_dev, ...@@ -328,10 +328,10 @@ static int cdns3_ep0_feature_handle_device(struct cdns3_device *priv_dev,
return -EINVAL; return -EINVAL;
switch (tmode >> 8) { switch (tmode >> 8) {
case TEST_J: case USB_TEST_J:
case TEST_K: case USB_TEST_K:
case TEST_SE0_NAK: case USB_TEST_SE0_NAK:
case TEST_PACKET: case USB_TEST_PACKET:
cdns3_set_register_bit(&priv_dev->regs->usb_cmd, cdns3_set_register_bit(&priv_dev->regs->usb_cmd,
USB_CMD_STMODE | USB_CMD_STMODE |
USB_STS_TMODE_SEL(tmode - 1)); USB_STS_TMODE_SEL(tmode - 1));
......
...@@ -1215,11 +1215,11 @@ __acquires(ci->lock) ...@@ -1215,11 +1215,11 @@ __acquires(ci->lock)
case USB_DEVICE_TEST_MODE: case USB_DEVICE_TEST_MODE:
tmode = le16_to_cpu(req.wIndex) >> 8; tmode = le16_to_cpu(req.wIndex) >> 8;
switch (tmode) { switch (tmode) {
case TEST_J: case USB_TEST_J:
case TEST_K: case USB_TEST_K:
case TEST_SE0_NAK: case USB_TEST_SE0_NAK:
case TEST_PACKET: case USB_TEST_PACKET:
case TEST_FORCE_EN: case USB_TEST_FORCE_ENABLE:
ci->test_mode = tmode; ci->test_mode = tmode;
err = isr_setup_status_phase( err = isr_setup_status_phase(
ci); ci);
......
...@@ -53,15 +53,15 @@ static const char *usb_decode_device_feature(u16 wValue) ...@@ -53,15 +53,15 @@ static const char *usb_decode_device_feature(u16 wValue)
static const char *usb_decode_test_mode(u16 wIndex) static const char *usb_decode_test_mode(u16 wIndex)
{ {
switch (wIndex) { switch (wIndex) {
case TEST_J: case USB_TEST_J:
return ": TEST_J"; return ": TEST_J";
case TEST_K: case USB_TEST_K:
return ": TEST_K"; return ": TEST_K";
case TEST_SE0_NAK: case USB_TEST_SE0_NAK:
return ": TEST_SE0_NAK"; return ": TEST_SE0_NAK";
case TEST_PACKET: case USB_TEST_PACKET:
return ": TEST_PACKET"; return ": TEST_PACKET";
case TEST_FORCE_EN: case USB_TEST_FORCE_ENABLE:
return ": TEST_FORCE_EN"; return ": TEST_FORCE_EN";
default: default:
return ": UNKNOWN"; return ": UNKNOWN";
......
...@@ -37,15 +37,15 @@ static ssize_t testmode_write(struct file *file, const char __user *ubuf, size_t ...@@ -37,15 +37,15 @@ static ssize_t testmode_write(struct file *file, const char __user *ubuf, size_t
return -EFAULT; return -EFAULT;
if (!strncmp(buf, "test_j", 6)) if (!strncmp(buf, "test_j", 6))
testmode = TEST_J; testmode = USB_TEST_J;
else if (!strncmp(buf, "test_k", 6)) else if (!strncmp(buf, "test_k", 6))
testmode = TEST_K; testmode = USB_TEST_K;
else if (!strncmp(buf, "test_se0_nak", 12)) else if (!strncmp(buf, "test_se0_nak", 12))
testmode = TEST_SE0_NAK; testmode = USB_TEST_SE0_NAK;
else if (!strncmp(buf, "test_packet", 11)) else if (!strncmp(buf, "test_packet", 11))
testmode = TEST_PACKET; testmode = USB_TEST_PACKET;
else if (!strncmp(buf, "test_force_enable", 17)) else if (!strncmp(buf, "test_force_enable", 17))
testmode = TEST_FORCE_EN; testmode = USB_TEST_FORCE_ENABLE;
else else
testmode = 0; testmode = 0;
...@@ -78,19 +78,19 @@ static int testmode_show(struct seq_file *s, void *unused) ...@@ -78,19 +78,19 @@ static int testmode_show(struct seq_file *s, void *unused)
case 0: case 0:
seq_puts(s, "no test\n"); seq_puts(s, "no test\n");
break; break;
case TEST_J: case USB_TEST_J:
seq_puts(s, "test_j\n"); seq_puts(s, "test_j\n");
break; break;
case TEST_K: case USB_TEST_K:
seq_puts(s, "test_k\n"); seq_puts(s, "test_k\n");
break; break;
case TEST_SE0_NAK: case USB_TEST_SE0_NAK:
seq_puts(s, "test_se0_nak\n"); seq_puts(s, "test_se0_nak\n");
break; break;
case TEST_PACKET: case USB_TEST_PACKET:
seq_puts(s, "test_packet\n"); seq_puts(s, "test_packet\n");
break; break;
case TEST_FORCE_EN: case USB_TEST_FORCE_ENABLE:
seq_puts(s, "test_force_enable\n"); seq_puts(s, "test_force_enable\n");
break; break;
default: default:
......
...@@ -1561,11 +1561,11 @@ int dwc2_hsotg_set_test_mode(struct dwc2_hsotg *hsotg, int testmode) ...@@ -1561,11 +1561,11 @@ int dwc2_hsotg_set_test_mode(struct dwc2_hsotg *hsotg, int testmode)
dctl &= ~DCTL_TSTCTL_MASK; dctl &= ~DCTL_TSTCTL_MASK;
switch (testmode) { switch (testmode) {
case TEST_J: case USB_TEST_J:
case TEST_K: case USB_TEST_K:
case TEST_SE0_NAK: case USB_TEST_SE0_NAK:
case TEST_PACKET: case USB_TEST_PACKET:
case TEST_FORCE_EN: case USB_TEST_FORCE_ENABLE:
dctl |= testmode << DCTL_TSTCTL_SHIFT; dctl |= testmode << DCTL_TSTCTL_SHIFT;
break; break;
default: default:
......
...@@ -466,19 +466,19 @@ static int dwc3_testmode_show(struct seq_file *s, void *unused) ...@@ -466,19 +466,19 @@ static int dwc3_testmode_show(struct seq_file *s, void *unused)
case 0: case 0:
seq_printf(s, "no test\n"); seq_printf(s, "no test\n");
break; break;
case TEST_J: case USB_TEST_J:
seq_printf(s, "test_j\n"); seq_printf(s, "test_j\n");
break; break;
case TEST_K: case USB_TEST_K:
seq_printf(s, "test_k\n"); seq_printf(s, "test_k\n");
break; break;
case TEST_SE0_NAK: case USB_TEST_SE0_NAK:
seq_printf(s, "test_se0_nak\n"); seq_printf(s, "test_se0_nak\n");
break; break;
case TEST_PACKET: case USB_TEST_PACKET:
seq_printf(s, "test_packet\n"); seq_printf(s, "test_packet\n");
break; break;
case TEST_FORCE_EN: case USB_TEST_FORCE_ENABLE:
seq_printf(s, "test_force_enable\n"); seq_printf(s, "test_force_enable\n");
break; break;
default: default:
...@@ -506,15 +506,15 @@ static ssize_t dwc3_testmode_write(struct file *file, ...@@ -506,15 +506,15 @@ static ssize_t dwc3_testmode_write(struct file *file,
return -EFAULT; return -EFAULT;
if (!strncmp(buf, "test_j", 6)) if (!strncmp(buf, "test_j", 6))
testmode = TEST_J; testmode = USB_TEST_J;
else if (!strncmp(buf, "test_k", 6)) else if (!strncmp(buf, "test_k", 6))
testmode = TEST_K; testmode = USB_TEST_K;
else if (!strncmp(buf, "test_se0_nak", 12)) else if (!strncmp(buf, "test_se0_nak", 12))
testmode = TEST_SE0_NAK; testmode = USB_TEST_SE0_NAK;
else if (!strncmp(buf, "test_packet", 11)) else if (!strncmp(buf, "test_packet", 11))
testmode = TEST_PACKET; testmode = USB_TEST_PACKET;
else if (!strncmp(buf, "test_force_enable", 17)) else if (!strncmp(buf, "test_force_enable", 17))
testmode = TEST_FORCE_EN; testmode = USB_TEST_FORCE_ENABLE;
else else
testmode = 0; testmode = 0;
......
...@@ -425,11 +425,11 @@ static int dwc3_ep0_handle_test(struct dwc3 *dwc, enum usb_device_state state, ...@@ -425,11 +425,11 @@ static int dwc3_ep0_handle_test(struct dwc3 *dwc, enum usb_device_state state,
return -EINVAL; return -EINVAL;
switch (wIndex >> 8) { switch (wIndex >> 8) {
case TEST_J: case USB_TEST_J:
case TEST_K: case USB_TEST_K:
case TEST_SE0_NAK: case USB_TEST_SE0_NAK:
case TEST_PACKET: case USB_TEST_PACKET:
case TEST_FORCE_EN: case USB_TEST_FORCE_ENABLE:
dwc->test_mode_nr = wIndex >> 8; dwc->test_mode_nr = wIndex >> 8;
dwc->test_mode = true; dwc->test_mode = true;
break; break;
......
...@@ -46,11 +46,11 @@ int dwc3_gadget_set_test_mode(struct dwc3 *dwc, int mode) ...@@ -46,11 +46,11 @@ int dwc3_gadget_set_test_mode(struct dwc3 *dwc, int mode)
reg &= ~DWC3_DCTL_TSTCTRL_MASK; reg &= ~DWC3_DCTL_TSTCTRL_MASK;
switch (mode) { switch (mode) {
case TEST_J: case USB_TEST_J:
case TEST_K: case USB_TEST_K:
case TEST_SE0_NAK: case USB_TEST_SE0_NAK:
case TEST_PACKET: case USB_TEST_PACKET:
case TEST_FORCE_EN: case USB_TEST_FORCE_ENABLE:
reg |= mode << 1; reg |= mode << 1;
break; break;
default: default:
......
...@@ -927,11 +927,11 @@ static int bdc_set_test_mode(struct bdc *bdc) ...@@ -927,11 +927,11 @@ static int bdc_set_test_mode(struct bdc *bdc)
usb2_pm &= ~BDC_PTC_MASK; usb2_pm &= ~BDC_PTC_MASK;
dev_dbg(bdc->dev, "%s\n", __func__); dev_dbg(bdc->dev, "%s\n", __func__);
switch (bdc->test_mode) { switch (bdc->test_mode) {
case TEST_J: case USB_TEST_J:
case TEST_K: case USB_TEST_K:
case TEST_SE0_NAK: case USB_TEST_SE0_NAK:
case TEST_PACKET: case USB_TEST_PACKET:
case TEST_FORCE_EN: case USB_TEST_FORCE_ENABLE:
usb2_pm |= bdc->test_mode << 28; usb2_pm |= bdc->test_mode << 28;
break; break;
default: default:
......
...@@ -912,9 +912,9 @@ static int gr_device_request(struct gr_udc *dev, u8 type, u8 request, ...@@ -912,9 +912,9 @@ static int gr_device_request(struct gr_udc *dev, u8 type, u8 request,
return gr_ep0_respond_empty(dev); return gr_ep0_respond_empty(dev);
case USB_DEVICE_TEST_MODE: case USB_DEVICE_TEST_MODE:
/* The hardware does not support TEST_FORCE_EN */ /* The hardware does not support USB_TEST_FORCE_ENABLE */
test = index >> 8; test = index >> 8;
if (test >= TEST_J && test <= TEST_PACKET) { if (test >= USB_TEST_J && test <= USB_TEST_PACKET) {
dev->test_mode = test; dev->test_mode = test;
return gr_ep0_respond(dev, NULL, 0, return gr_ep0_respond(dev, NULL, 0,
gr_ep0_testmode_complete); gr_ep0_testmode_complete);
......
...@@ -1502,7 +1502,7 @@ udc_prime_status(struct mv_udc *udc, u8 direction, u16 status, bool empty) ...@@ -1502,7 +1502,7 @@ udc_prime_status(struct mv_udc *udc, u8 direction, u16 status, bool empty)
static void mv_udc_testmode(struct mv_udc *udc, u16 index) static void mv_udc_testmode(struct mv_udc *udc, u16 index)
{ {
if (index <= TEST_FORCE_EN) { if (index <= USB_TEST_FORCE_ENABLE) {
udc->test_mode = index; udc->test_mode = index;
if (udc_prime_status(udc, EP_DIR_IN, 0, true)) if (udc_prime_status(udc, EP_DIR_IN, 0, true))
ep0_stall(udc); ep0_stall(udc);
......
...@@ -1688,7 +1688,7 @@ net2272_set_test_mode(struct net2272 *dev, int mode) ...@@ -1688,7 +1688,7 @@ net2272_set_test_mode(struct net2272 *dev, int mode)
net2272_write(dev, USBTEST, mode); net2272_write(dev, USBTEST, mode);
/* load test packet */ /* load test packet */
if (mode == TEST_PACKET) { if (mode == USB_TEST_PACKET) {
/* switch to 8 bit mode */ /* switch to 8 bit mode */
net2272_write(dev, LOCCTL, net2272_read(dev, LOCCTL) & net2272_write(dev, LOCCTL, net2272_read(dev, LOCCTL) &
~(1 << DATA_WIDTH)); ~(1 << DATA_WIDTH));
......
...@@ -105,11 +105,6 @@ ...@@ -105,11 +105,6 @@
#define USBTEST 0x32 #define USBTEST 0x32
#define TEST_MODE_SELECT 0 #define TEST_MODE_SELECT 0
#define NORMAL_OPERATION 0 #define NORMAL_OPERATION 0
#define TEST_J 1
#define TEST_K 2
#define TEST_SE0_NAK 3
#define TEST_PACKET 4
#define TEST_FORCE_ENABLE 5
#define XCVRDIAG 0x33 #define XCVRDIAG 0x33
#define FORCE_FULL_SPEED 2 #define FORCE_FULL_SPEED 2
#define FORCE_HIGH_SPEED 3 #define FORCE_HIGH_SPEED 3
......
...@@ -2097,9 +2097,9 @@ static int xudc_probe(struct platform_device *pdev) ...@@ -2097,9 +2097,9 @@ static int xudc_probe(struct platform_device *pdev)
/* Check for IP endianness */ /* Check for IP endianness */
udc->write_fn = xudc_write32_be; udc->write_fn = xudc_write32_be;
udc->read_fn = xudc_read32_be; udc->read_fn = xudc_read32_be;
udc->write_fn(udc->addr, XUSB_TESTMODE_OFFSET, TEST_J); udc->write_fn(udc->addr, XUSB_TESTMODE_OFFSET, USB_TEST_J);
if ((udc->read_fn(udc->addr + XUSB_TESTMODE_OFFSET)) if ((udc->read_fn(udc->addr + XUSB_TESTMODE_OFFSET))
!= TEST_J) { != USB_TEST_J) {
udc->write_fn = xudc_write32; udc->write_fn = xudc_write32;
udc->read_fn = xudc_read32; udc->read_fn = xudc_read32;
} }
......
...@@ -612,7 +612,7 @@ static void xhci_port_set_test_mode(struct xhci_hcd *xhci, ...@@ -612,7 +612,7 @@ static void xhci_port_set_test_mode(struct xhci_hcd *xhci,
temp |= test_mode << PORT_TEST_MODE_SHIFT; temp |= test_mode << PORT_TEST_MODE_SHIFT;
writel(temp, port->addr + PORTPMSC); writel(temp, port->addr + PORTPMSC);
xhci->test_mode = test_mode; xhci->test_mode = test_mode;
if (test_mode == TEST_FORCE_EN) if (test_mode == USB_TEST_FORCE_ENABLE)
xhci_start(xhci); xhci_start(xhci);
} }
...@@ -666,7 +666,7 @@ static int xhci_exit_test_mode(struct xhci_hcd *xhci) ...@@ -666,7 +666,7 @@ static int xhci_exit_test_mode(struct xhci_hcd *xhci)
xhci_err(xhci, "Not in test mode, do nothing.\n"); xhci_err(xhci, "Not in test mode, do nothing.\n");
return 0; return 0;
} }
if (xhci->test_mode == TEST_FORCE_EN && if (xhci->test_mode == USB_TEST_FORCE_ENABLE &&
!(xhci->xhc_state & XHCI_STATE_HALTED)) { !(xhci->xhc_state & XHCI_STATE_HALTED)) {
retval = xhci_halt(xhci); retval = xhci_halt(xhci);
if (retval) if (retval)
...@@ -1421,7 +1421,8 @@ int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, ...@@ -1421,7 +1421,8 @@ int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
/* 4.19.6 Port Test Modes (USB2 Test Mode) */ /* 4.19.6 Port Test Modes (USB2 Test Mode) */
if (hcd->speed != HCD_USB2) if (hcd->speed != HCD_USB2)
goto error; goto error;
if (test_mode > TEST_FORCE_EN || test_mode < TEST_J) if (test_mode > USB_TEST_FORCE_ENABLE ||
test_mode < USB_TEST_J)
goto error; goto error;
retval = xhci_enter_test_mode(xhci, test_mode, wIndex, retval = xhci_enter_test_mode(xhci, test_mode, wIndex,
&flags); &flags);
......
...@@ -33,28 +33,28 @@ static int ehset_probe(struct usb_interface *intf, ...@@ -33,28 +33,28 @@ static int ehset_probe(struct usb_interface *intf,
ret = usb_control_msg(hub_udev, usb_sndctrlpipe(hub_udev, 0), ret = usb_control_msg(hub_udev, usb_sndctrlpipe(hub_udev, 0),
USB_REQ_SET_FEATURE, USB_RT_PORT, USB_REQ_SET_FEATURE, USB_RT_PORT,
USB_PORT_FEAT_TEST, USB_PORT_FEAT_TEST,
(TEST_SE0_NAK << 8) | portnum, (USB_TEST_SE0_NAK << 8) | portnum,
NULL, 0, 1000); NULL, 0, 1000);
break; break;
case TEST_J_PID: case TEST_J_PID:
ret = usb_control_msg(hub_udev, usb_sndctrlpipe(hub_udev, 0), ret = usb_control_msg(hub_udev, usb_sndctrlpipe(hub_udev, 0),
USB_REQ_SET_FEATURE, USB_RT_PORT, USB_REQ_SET_FEATURE, USB_RT_PORT,
USB_PORT_FEAT_TEST, USB_PORT_FEAT_TEST,
(TEST_J << 8) | portnum, (USB_TEST_J << 8) | portnum,
NULL, 0, 1000); NULL, 0, 1000);
break; break;
case TEST_K_PID: case TEST_K_PID:
ret = usb_control_msg(hub_udev, usb_sndctrlpipe(hub_udev, 0), ret = usb_control_msg(hub_udev, usb_sndctrlpipe(hub_udev, 0),
USB_REQ_SET_FEATURE, USB_RT_PORT, USB_REQ_SET_FEATURE, USB_RT_PORT,
USB_PORT_FEAT_TEST, USB_PORT_FEAT_TEST,
(TEST_K << 8) | portnum, (USB_TEST_K << 8) | portnum,
NULL, 0, 1000); NULL, 0, 1000);
break; break;
case TEST_PACKET_PID: case TEST_PACKET_PID:
ret = usb_control_msg(hub_udev, usb_sndctrlpipe(hub_udev, 0), ret = usb_control_msg(hub_udev, usb_sndctrlpipe(hub_udev, 0),
USB_REQ_SET_FEATURE, USB_RT_PORT, USB_REQ_SET_FEATURE, USB_RT_PORT,
USB_PORT_FEAT_TEST, USB_PORT_FEAT_TEST,
(TEST_PACKET << 8) | portnum, (USB_TEST_PACKET << 8) | portnum,
NULL, 0, 1000); NULL, 0, 1000);
break; break;
case TEST_HS_HOST_PORT_SUSPEND_RESUME: case TEST_HS_HOST_PORT_SUSPEND_RESUME:
......
...@@ -278,20 +278,20 @@ static int handle_test_mode(struct mtu3 *mtu, struct usb_ctrlrequest *setup) ...@@ -278,20 +278,20 @@ static int handle_test_mode(struct mtu3 *mtu, struct usb_ctrlrequest *setup)
u32 value; u32 value;
switch (le16_to_cpu(setup->wIndex) >> 8) { switch (le16_to_cpu(setup->wIndex) >> 8) {
case TEST_J: case USB_TEST_J:
dev_dbg(mtu->dev, "TEST_J\n"); dev_dbg(mtu->dev, "USB_TEST_J\n");
mtu->test_mode_nr = TEST_J_MODE; mtu->test_mode_nr = TEST_J_MODE;
break; break;
case TEST_K: case USB_TEST_K:
dev_dbg(mtu->dev, "TEST_K\n"); dev_dbg(mtu->dev, "USB_TEST_K\n");
mtu->test_mode_nr = TEST_K_MODE; mtu->test_mode_nr = TEST_K_MODE;
break; break;
case TEST_SE0_NAK: case USB_TEST_SE0_NAK:
dev_dbg(mtu->dev, "TEST_SE0_NAK\n"); dev_dbg(mtu->dev, "USB_TEST_SE0_NAK\n");
mtu->test_mode_nr = TEST_SE0_NAK_MODE; mtu->test_mode_nr = TEST_SE0_NAK_MODE;
break; break;
case TEST_PACKET: case USB_TEST_PACKET:
dev_dbg(mtu->dev, "TEST_PACKET\n"); dev_dbg(mtu->dev, "USB_TEST_PACKET\n");
mtu->test_mode_nr = TEST_PACKET_MODE; mtu->test_mode_nr = TEST_PACKET_MODE;
break; break;
default: default:
......
...@@ -311,27 +311,23 @@ __acquires(musb->lock) ...@@ -311,27 +311,23 @@ __acquires(musb->lock)
goto stall; goto stall;
switch (ctrlrequest->wIndex >> 8) { switch (ctrlrequest->wIndex >> 8) {
case 1: case USB_TEST_J:
pr_debug("TEST_J\n"); pr_debug("USB_TEST_J\n");
/* TEST_J */
musb->test_mode_nr = musb->test_mode_nr =
MUSB_TEST_J; MUSB_TEST_J;
break; break;
case 2: case USB_TEST_K:
/* TEST_K */ pr_debug("USB_TEST_K\n");
pr_debug("TEST_K\n");
musb->test_mode_nr = musb->test_mode_nr =
MUSB_TEST_K; MUSB_TEST_K;
break; break;
case 3: case USB_TEST_SE0_NAK:
/* TEST_SE0_NAK */ pr_debug("USB_TEST_SE0_NAK\n");
pr_debug("TEST_SE0_NAK\n");
musb->test_mode_nr = musb->test_mode_nr =
MUSB_TEST_SE0_NAK; MUSB_TEST_SE0_NAK;
break; break;
case 4: case USB_TEST_PACKET:
/* TEST_PACKET */ pr_debug("USB_TEST_PACKET\n");
pr_debug("TEST_PACKET\n");
musb->test_mode_nr = musb->test_mode_nr =
MUSB_TEST_PACKET; MUSB_TEST_PACKET;
break; break;
......
...@@ -385,25 +385,25 @@ int musb_hub_control( ...@@ -385,25 +385,25 @@ int musb_hub_control(
wIndex >>= 8; wIndex >>= 8;
switch (wIndex) { switch (wIndex) {
case 1: case USB_TEST_J:
pr_debug("TEST_J\n"); pr_debug("USB_TEST_J\n");
temp = MUSB_TEST_J; temp = MUSB_TEST_J;
break; break;
case 2: case USB_TEST_K:
pr_debug("TEST_K\n"); pr_debug("USB_TEST_K\n");
temp = MUSB_TEST_K; temp = MUSB_TEST_K;
break; break;
case 3: case USB_TEST_SE0_NAK:
pr_debug("TEST_SE0_NAK\n"); pr_debug("USB_TEST_SE0_NAK\n");
temp = MUSB_TEST_SE0_NAK; temp = MUSB_TEST_SE0_NAK;
break; break;
case 4: case USB_TEST_PACKET:
pr_debug("TEST_PACKET\n"); pr_debug("USB_TEST_PACKET\n");
temp = MUSB_TEST_PACKET; temp = MUSB_TEST_PACKET;
musb_load_testpacket(musb); musb_load_testpacket(musb);
break; break;
case 5: case USB_TEST_FORCE_ENABLE:
pr_debug("TEST_FORCE_ENABLE\n"); pr_debug("USB_TEST_FORCE_ENABLE\n");
temp = MUSB_TEST_FORCE_HOST temp = MUSB_TEST_FORCE_HOST
| MUSB_TEST_FORCE_HS; | MUSB_TEST_FORCE_HS;
......
...@@ -138,11 +138,11 @@ ...@@ -138,11 +138,11 @@
* Test Mode Selectors * Test Mode Selectors
* See USB 2.0 spec Table 9-7 * See USB 2.0 spec Table 9-7
*/ */
#define TEST_J 1 #define USB_TEST_J 1
#define TEST_K 2 #define USB_TEST_K 2
#define TEST_SE0_NAK 3 #define USB_TEST_SE0_NAK 3
#define TEST_PACKET 4 #define USB_TEST_PACKET 4
#define TEST_FORCE_EN 5 #define USB_TEST_FORCE_ENABLE 5
/* Status Type */ /* Status Type */
#define USB_STATUS_TYPE_STANDARD 0 #define USB_STATUS_TYPE_STANDARD 0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment