xhci-hub.c (288ead45fa6637e959015d055304f521cbbc0575) | xhci-hub.c (749da5f82fe33ff68dd4aa1a5e35cd9aa6246dab) |
---|---|
1/* 2 * xHCI host controller driver 3 * 4 * Copyright (C) 2008 Intel Corp. 5 * 6 * Author: Sarah Sharp 7 * Some code borrowed from the Linux EHCI driver. 8 * --- 191 unchanged lines hidden (view full) --- 200 wIndex--; 201 status = 0; 202 addr = &xhci->op_regs->port_status_base + NUM_PORT_REGS*(wIndex & 0xff); 203 temp = xhci_readl(xhci, addr); 204 xhci_dbg(xhci, "get port status, actual port %d status = 0x%x\n", wIndex, temp); 205 206 /* wPortChange bits */ 207 if (temp & PORT_CSC) | 1/* 2 * xHCI host controller driver 3 * 4 * Copyright (C) 2008 Intel Corp. 5 * 6 * Author: Sarah Sharp 7 * Some code borrowed from the Linux EHCI driver. 8 * --- 191 unchanged lines hidden (view full) --- 200 wIndex--; 201 status = 0; 202 addr = &xhci->op_regs->port_status_base + NUM_PORT_REGS*(wIndex & 0xff); 203 temp = xhci_readl(xhci, addr); 204 xhci_dbg(xhci, "get port status, actual port %d status = 0x%x\n", wIndex, temp); 205 206 /* wPortChange bits */ 207 if (temp & PORT_CSC) |
208 status |= 1 << USB_PORT_FEAT_C_CONNECTION; | 208 status |= USB_PORT_STAT_C_CONNECTION << 16; |
209 if (temp & PORT_PEC) | 209 if (temp & PORT_PEC) |
210 status |= 1 << USB_PORT_FEAT_C_ENABLE; | 210 status |= USB_PORT_STAT_C_ENABLE << 16; |
211 if ((temp & PORT_OCC)) | 211 if ((temp & PORT_OCC)) |
212 status |= 1 << USB_PORT_FEAT_C_OVER_CURRENT; | 212 status |= USB_PORT_STAT_C_OVERCURRENT << 16; |
213 /* 214 * FIXME ignoring suspend, reset, and USB 2.1/3.0 specific 215 * changes 216 */ 217 if (temp & PORT_CONNECT) { | 213 /* 214 * FIXME ignoring suspend, reset, and USB 2.1/3.0 specific 215 * changes 216 */ 217 if (temp & PORT_CONNECT) { |
218 status |= 1 << USB_PORT_FEAT_CONNECTION; | 218 status |= USB_PORT_STAT_CONNECTION; |
219 status |= xhci_port_speed(temp); 220 } 221 if (temp & PORT_PE) | 219 status |= xhci_port_speed(temp); 220 } 221 if (temp & PORT_PE) |
222 status |= 1 << USB_PORT_FEAT_ENABLE; | 222 status |= USB_PORT_STAT_ENABLE; |
223 if (temp & PORT_OC) | 223 if (temp & PORT_OC) |
224 status |= 1 << USB_PORT_FEAT_OVER_CURRENT; | 224 status |= USB_PORT_STAT_OVERCURRENT; |
225 if (temp & PORT_RESET) | 225 if (temp & PORT_RESET) |
226 status |= 1 << USB_PORT_FEAT_RESET; | 226 status |= USB_PORT_STAT_RESET; |
227 if (temp & PORT_POWER) | 227 if (temp & PORT_POWER) |
228 status |= 1 << USB_PORT_FEAT_POWER; | 228 status |= USB_PORT_STAT_POWER; |
229 xhci_dbg(xhci, "Get port status returned 0x%x\n", status); 230 put_unaligned(cpu_to_le32(status), (__le32 *) buf); 231 break; 232 case SetPortFeature: 233 wIndex &= 0xff; 234 if (!wIndex || wIndex > ports) 235 goto error; 236 wIndex--; --- 107 unchanged lines hidden --- | 229 xhci_dbg(xhci, "Get port status returned 0x%x\n", status); 230 put_unaligned(cpu_to_le32(status), (__le32 *) buf); 231 break; 232 case SetPortFeature: 233 wIndex &= 0xff; 234 if (!wIndex || wIndex > ports) 235 goto error; 236 wIndex--; --- 107 unchanged lines hidden --- |