diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-01-08 14:42:04 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-01-08 14:42:04 -0500 |
commit | 83280e90ef001f77a64e2ce59c25ab66e47ab1f0 (patch) | |
tree | ec0a5842e2fbc0f4abaff55299acac397b8da5c3 /drivers/usb/dwc2/params.c | |
parent | cc250e267bd56c531b0bee455fc724d50af83fac (diff) | |
parent | 0a8fd1346254974c3a852338508e4a4cddbb35f1 (diff) |
Merge tag 'usb-4.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Pull USB fixes from Greg KH:
"Here are a bunch of USB fixes for 4.10-rc3. Yeah, it's a lot, an
artifact of the holiday break I think.
Lots of gadget and the usual XHCI fixups for reported issues (one day
that driver will calm down...) Also included are a bunch of usb-serial
driver fixes, and for good measure, a number of much-reported MUSB
driver issues have finally been resolved.
All of these have been in linux-next with no reported issues"
* tag 'usb-4.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (72 commits)
USB: fix problems with duplicate endpoint addresses
usb: ohci-at91: use descriptor-based gpio APIs correctly
usb: storage: unusual_uas: Add JMicron JMS56x to unusual device
usb: hub: Move hub_port_disable() to fix warning if PM is disabled
usb: musb: blackfin: add bfin_fifo_offset in bfin_ops
usb: musb: fix compilation warning on unused function
usb: musb: Fix trying to free already-free IRQ 4
usb: musb: dsps: implement clear_ep_rxintr() callback
usb: musb: core: add clear_ep_rxintr() to musb_platform_ops
USB: serial: ti_usb_3410_5052: fix NULL-deref at open
USB: serial: spcp8x5: fix NULL-deref at open
USB: serial: quatech2: fix sleep-while-atomic in close
USB: serial: pl2303: fix NULL-deref at open
USB: serial: oti6858: fix NULL-deref at open
USB: serial: omninet: fix NULL-derefs at open and disconnect
USB: serial: mos7840: fix misleading interrupt-URB comment
USB: serial: mos7840: remove unused write URB
USB: serial: mos7840: fix NULL-deref at open
USB: serial: mos7720: remove obsolete port initialisation
USB: serial: mos7720: fix parallel probe
...
Diffstat (limited to 'drivers/usb/dwc2/params.c')
-rw-r--r-- | drivers/usb/dwc2/params.c | 30 |
1 files changed, 9 insertions, 21 deletions
diff --git a/drivers/usb/dwc2/params.c b/drivers/usb/dwc2/params.c index a786256535b6..11fe68a4627b 100644 --- a/drivers/usb/dwc2/params.c +++ b/drivers/usb/dwc2/params.c | |||
@@ -247,8 +247,6 @@ MODULE_DEVICE_TABLE(of, dwc2_of_match_table); | |||
247 | static void dwc2_get_device_property(struct dwc2_hsotg *hsotg, | 247 | static void dwc2_get_device_property(struct dwc2_hsotg *hsotg, |
248 | char *property, u8 size, u64 *value) | 248 | char *property, u8 size, u64 *value) |
249 | { | 249 | { |
250 | u8 val8; | ||
251 | u16 val16; | ||
252 | u32 val32; | 250 | u32 val32; |
253 | 251 | ||
254 | switch (size) { | 252 | switch (size) { |
@@ -256,17 +254,7 @@ static void dwc2_get_device_property(struct dwc2_hsotg *hsotg, | |||
256 | *value = device_property_read_bool(hsotg->dev, property); | 254 | *value = device_property_read_bool(hsotg->dev, property); |
257 | break; | 255 | break; |
258 | case 1: | 256 | case 1: |
259 | if (device_property_read_u8(hsotg->dev, property, &val8)) | ||
260 | return; | ||
261 | |||
262 | *value = val8; | ||
263 | break; | ||
264 | case 2: | 257 | case 2: |
265 | if (device_property_read_u16(hsotg->dev, property, &val16)) | ||
266 | return; | ||
267 | |||
268 | *value = val16; | ||
269 | break; | ||
270 | case 4: | 258 | case 4: |
271 | if (device_property_read_u32(hsotg->dev, property, &val32)) | 259 | if (device_property_read_u32(hsotg->dev, property, &val32)) |
272 | return; | 260 | return; |
@@ -1100,13 +1088,13 @@ static void dwc2_set_gadget_dma(struct dwc2_hsotg *hsotg) | |||
1100 | /* Buffer DMA */ | 1088 | /* Buffer DMA */ |
1101 | dwc2_set_param_bool(hsotg, &p->g_dma, | 1089 | dwc2_set_param_bool(hsotg, &p->g_dma, |
1102 | false, "gadget-dma", | 1090 | false, "gadget-dma", |
1103 | true, false, | 1091 | dma_capable, false, |
1104 | dma_capable); | 1092 | dma_capable); |
1105 | 1093 | ||
1106 | /* DMA Descriptor */ | 1094 | /* DMA Descriptor */ |
1107 | dwc2_set_param_bool(hsotg, &p->g_dma_desc, false, | 1095 | dwc2_set_param_bool(hsotg, &p->g_dma_desc, false, |
1108 | "gadget-dma-desc", | 1096 | "gadget-dma-desc", |
1109 | p->g_dma, false, | 1097 | !!hw->dma_desc_enable, false, |
1110 | !!hw->dma_desc_enable); | 1098 | !!hw->dma_desc_enable); |
1111 | } | 1099 | } |
1112 | 1100 | ||
@@ -1130,8 +1118,14 @@ static void dwc2_set_parameters(struct dwc2_hsotg *hsotg, | |||
1130 | 1118 | ||
1131 | dwc2_set_param_bool(hsotg, &p->host_dma, | 1119 | dwc2_set_param_bool(hsotg, &p->host_dma, |
1132 | false, "host-dma", | 1120 | false, "host-dma", |
1133 | true, false, | 1121 | dma_capable, false, |
1134 | dma_capable); | 1122 | dma_capable); |
1123 | dwc2_set_param_host_rx_fifo_size(hsotg, | ||
1124 | params->host_rx_fifo_size); | ||
1125 | dwc2_set_param_host_nperio_tx_fifo_size(hsotg, | ||
1126 | params->host_nperio_tx_fifo_size); | ||
1127 | dwc2_set_param_host_perio_tx_fifo_size(hsotg, | ||
1128 | params->host_perio_tx_fifo_size); | ||
1135 | } | 1129 | } |
1136 | dwc2_set_param_dma_desc_enable(hsotg, params->dma_desc_enable); | 1130 | dwc2_set_param_dma_desc_enable(hsotg, params->dma_desc_enable); |
1137 | dwc2_set_param_dma_desc_fs_enable(hsotg, params->dma_desc_fs_enable); | 1131 | dwc2_set_param_dma_desc_fs_enable(hsotg, params->dma_desc_fs_enable); |
@@ -1140,12 +1134,6 @@ static void dwc2_set_parameters(struct dwc2_hsotg *hsotg, | |||
1140 | params->host_support_fs_ls_low_power); | 1134 | params->host_support_fs_ls_low_power); |
1141 | dwc2_set_param_enable_dynamic_fifo(hsotg, | 1135 | dwc2_set_param_enable_dynamic_fifo(hsotg, |
1142 | params->enable_dynamic_fifo); | 1136 | params->enable_dynamic_fifo); |
1143 | dwc2_set_param_host_rx_fifo_size(hsotg, | ||
1144 | params->host_rx_fifo_size); | ||
1145 | dwc2_set_param_host_nperio_tx_fifo_size(hsotg, | ||
1146 | params->host_nperio_tx_fifo_size); | ||
1147 | dwc2_set_param_host_perio_tx_fifo_size(hsotg, | ||
1148 | params->host_perio_tx_fifo_size); | ||
1149 | dwc2_set_param_max_transfer_size(hsotg, | 1137 | dwc2_set_param_max_transfer_size(hsotg, |
1150 | params->max_transfer_size); | 1138 | params->max_transfer_size); |
1151 | dwc2_set_param_max_packet_count(hsotg, | 1139 | dwc2_set_param_max_packet_count(hsotg, |