This is the 4.9.173 stable release
-----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAlzNNecACgkQONu9yGCS aT7gaw//b1JYNDeBdmi7Z7RWIqJwCkpOnSRWB4D4Pu4cHBfNzqagvP1YbGIHsvCt y1FrXBEymTX3NV3+nGuVpjbVM0SqiEgXi1aLcPXG5JBeHPF9AnhdFj/ilsyJJzoU TkjJVFRxx4kvdJwX7rfGspz85Me6XqInt3lRs8erQkDL0RdTgwoNdZafmQxngKxL hbC7a1m/9J3zLK+zEW4D68ALkFVAMKevh9dAUDE0Wwi30Lye0NbuwoyYRC5t0TdB Oxw60ox2z/YFIz+zDb/bTC1bO8Jit+HQiw3SMC3Dbl/hzpa9upw65Ksg9A9K5QIB 9ejuZeb4d2LaM3xZfa8nc7tnzBkqYceGWURG4kjRLL4at2bnNc+XNtNwyALZK7t7 Vl550X64QNQJ2bnOsnqaB0ZWwJDtLp6F5D5LSsQZb/UfgHvjBQZrPZYoEtS6cXh2 aXgxpYYC7p8X4nc0HJ5ytD8zGq0fGVahwQUunZrvTQZeiMXWGvywB4hvsvn/4IHL XbzWpZEZaiTFhL4nTE82SyjnUQCLkqePQd0rB8ngTq3RPhuFJ1HEPq4xVaYUAOSB /9ZKkgVfIodA2aE3XIx06Yw2gZsmD/5Spw+lQk5MSg56zgDL10rEVNSnQcS/DqgR bYp7fbX47RS8QtbkbmJC8crH598DCg26COldoihnZuNcaS6FP7E= =t8la -----END PGP SIGNATURE----- Merge 4.9.173 into android-4.9 Changes in 4.9.173 usbnet: ipheth: prevent TX queue timeouts when device not ready usbnet: ipheth: fix potential null pointer dereference in ipheth_carrier_set media: vivid: check if the cec_adapter is valid ARM: dts: bcm283x: Fix hdmi hpd gpio pull s390: limit brk randomization to 32MB qlcnic: Avoid potential NULL pointer dereference netfilter: nft_set_rbtree: check for inactive element after flag mismatch netfilter: bridge: set skb transport_header before entering NF_INET_PRE_ROUTING sc16is7xx: missing unregister/delete driver on error in sc16is7xx_init() serial: ar933x_uart: Fix build failure with disabled console usb: gadget: net2280: Fix overrun of OUT messages usb: gadget: net2280: Fix net2280_dequeue() usb: gadget: net2272: Fix net2272_dequeue() ARM: dts: pfla02: increase phy reset duration net: ks8851: Dequeue RX packets explicitly net: ks8851: Reassert reset pin if chip ID check fails net: ks8851: Delay requesting IRQ until opened net: ks8851: Set initial carrier state to down staging: rtl8712: uninitialized memory in read_bbreg_hdl() NFS: Fix a typo in nfs_init_timeout_values() net: xilinx: fix possible object reference leak net: ibm: fix possible object reference leak net: ethernet: ti: fix possible object reference leak scsi: qla4xxx: fix a potential NULL pointer dereference usb: u132-hcd: fix resource leak ceph: fix use-after-free on symlink traversal scsi: zfcp: reduce flood of fcrscn1 trace records on multi-element RSCN libata: fix using DMA buffers on stack gpio: of: Fix of_gpiochip_add() error path kconfig/[mn]conf: handle backspace (^H) key leds: pca9532: fix a potential NULL pointer dereference vfio/type1: Limit DMA mappings per container Linux 4.9.173 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
commit
336c47db9e
32 changed files with 175 additions and 95 deletions
2
Makefile
2
Makefile
|
|
@ -1,6 +1,6 @@
|
|||
VERSION = 4
|
||||
PATCHLEVEL = 9
|
||||
SUBLEVEL = 172
|
||||
SUBLEVEL = 173
|
||||
EXTRAVERSION =
|
||||
NAME = Roaring Lionus
|
||||
|
||||
|
|
|
|||
|
|
@ -26,5 +26,5 @@
|
|||
};
|
||||
|
||||
&hdmi {
|
||||
hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
|
||||
hpd-gpios = <&gpio 46 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -90,6 +90,7 @@
|
|||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_enet>;
|
||||
phy-mode = "rgmii";
|
||||
phy-reset-duration = <10>; /* in msecs */
|
||||
phy-reset-gpios = <&gpio3 23 GPIO_ACTIVE_LOW>;
|
||||
phy-supply = <&vdd_eth_io_reg>;
|
||||
status = "disabled";
|
||||
|
|
|
|||
|
|
@ -215,11 +215,14 @@ do { \
|
|||
|
||||
/*
|
||||
* Cache aliasing on the latest machines calls for a mapping granularity
|
||||
* of 512KB. For 64-bit processes use a 512KB alignment and a randomization
|
||||
* of up to 1GB. For 31-bit processes the virtual address space is limited,
|
||||
* use no alignment and limit the randomization to 8MB.
|
||||
* of 512KB for the anonymous mapping base. For 64-bit processes use a
|
||||
* 512KB alignment and a randomization of up to 1GB. For 31-bit processes
|
||||
* the virtual address space is limited, use no alignment and limit the
|
||||
* randomization to 8MB.
|
||||
* For the additional randomization of the program break use 32MB for
|
||||
* 64-bit and 8MB for 31-bit.
|
||||
*/
|
||||
#define BRK_RND_MASK (is_compat_task() ? 0x7ffUL : 0x3ffffUL)
|
||||
#define BRK_RND_MASK (is_compat_task() ? 0x7ffUL : 0x1fffUL)
|
||||
#define MMAP_RND_MASK (is_compat_task() ? 0x7ffUL : 0x3ff80UL)
|
||||
#define MMAP_ALIGN_MASK (is_compat_task() ? 0 : 0x7fUL)
|
||||
#define STACK_RND_MASK MMAP_RND_MASK
|
||||
|
|
|
|||
|
|
@ -51,38 +51,52 @@ static int eject_tray(struct ata_device *dev)
|
|||
/* Per the spec, only slot type and drawer type ODD can be supported */
|
||||
static enum odd_mech_type zpodd_get_mech_type(struct ata_device *dev)
|
||||
{
|
||||
char buf[16];
|
||||
char *buf;
|
||||
unsigned int ret;
|
||||
struct rm_feature_desc *desc = (void *)(buf + 8);
|
||||
struct rm_feature_desc *desc;
|
||||
struct ata_taskfile tf;
|
||||
static const char cdb[] = { GPCMD_GET_CONFIGURATION,
|
||||
2, /* only 1 feature descriptor requested */
|
||||
0, 3, /* 3, removable medium feature */
|
||||
0, 0, 0,/* reserved */
|
||||
0, sizeof(buf),
|
||||
0, 16,
|
||||
0, 0, 0,
|
||||
};
|
||||
|
||||
buf = kzalloc(16, GFP_KERNEL);
|
||||
if (!buf)
|
||||
return ODD_MECH_TYPE_UNSUPPORTED;
|
||||
desc = (void *)(buf + 8);
|
||||
|
||||
ata_tf_init(dev, &tf);
|
||||
tf.flags = ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE;
|
||||
tf.command = ATA_CMD_PACKET;
|
||||
tf.protocol = ATAPI_PROT_PIO;
|
||||
tf.lbam = sizeof(buf);
|
||||
tf.lbam = 16;
|
||||
|
||||
ret = ata_exec_internal(dev, &tf, cdb, DMA_FROM_DEVICE,
|
||||
buf, sizeof(buf), 0);
|
||||
if (ret)
|
||||
buf, 16, 0);
|
||||
if (ret) {
|
||||
kfree(buf);
|
||||
return ODD_MECH_TYPE_UNSUPPORTED;
|
||||
}
|
||||
|
||||
if (be16_to_cpu(desc->feature_code) != 3)
|
||||
if (be16_to_cpu(desc->feature_code) != 3) {
|
||||
kfree(buf);
|
||||
return ODD_MECH_TYPE_UNSUPPORTED;
|
||||
}
|
||||
|
||||
if (desc->mech_type == 0 && desc->load == 0 && desc->eject == 1)
|
||||
if (desc->mech_type == 0 && desc->load == 0 && desc->eject == 1) {
|
||||
kfree(buf);
|
||||
return ODD_MECH_TYPE_SLOT;
|
||||
else if (desc->mech_type == 1 && desc->load == 0 && desc->eject == 1)
|
||||
} else if (desc->mech_type == 1 && desc->load == 0 &&
|
||||
desc->eject == 1) {
|
||||
kfree(buf);
|
||||
return ODD_MECH_TYPE_DRAWER;
|
||||
else
|
||||
} else {
|
||||
kfree(buf);
|
||||
return ODD_MECH_TYPE_UNSUPPORTED;
|
||||
}
|
||||
}
|
||||
|
||||
/* Test if ODD is zero power ready by sense code */
|
||||
|
|
|
|||
|
|
@ -531,7 +531,13 @@ int of_gpiochip_add(struct gpio_chip *chip)
|
|||
|
||||
of_node_get(chip->of_node);
|
||||
|
||||
return of_gpiochip_scan_gpios(chip);
|
||||
status = of_gpiochip_scan_gpios(chip);
|
||||
if (status) {
|
||||
of_node_put(chip->of_node);
|
||||
gpiochip_remove_pin_ranges(chip);
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
void of_gpiochip_remove(struct gpio_chip *chip)
|
||||
|
|
|
|||
|
|
@ -488,6 +488,7 @@ static int pca9532_probe(struct i2c_client *client,
|
|||
const struct i2c_device_id *id)
|
||||
{
|
||||
int devid;
|
||||
const struct of_device_id *of_id;
|
||||
struct pca9532_data *data = i2c_get_clientdata(client);
|
||||
struct pca9532_platform_data *pca9532_pdata =
|
||||
dev_get_platdata(&client->dev);
|
||||
|
|
@ -503,8 +504,11 @@ static int pca9532_probe(struct i2c_client *client,
|
|||
dev_err(&client->dev, "no platform data\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
devid = (int)(uintptr_t)of_match_device(
|
||||
of_pca9532_leds_match, &client->dev)->data;
|
||||
of_id = of_match_device(of_pca9532_leds_match,
|
||||
&client->dev);
|
||||
if (unlikely(!of_id))
|
||||
return -EINVAL;
|
||||
devid = (int)(uintptr_t) of_id->data;
|
||||
} else {
|
||||
devid = id->driver_data;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -841,6 +841,7 @@ int vidioc_g_edid(struct file *file, void *_fh,
|
|||
if (edid->start_block + edid->blocks > dev->edid_blocks)
|
||||
edid->blocks = dev->edid_blocks - edid->start_block;
|
||||
memcpy(edid->edid, dev->edid, edid->blocks * 128);
|
||||
cec_set_edid_phys_addr(edid->edid, edid->blocks * 128, adap->phys_addr);
|
||||
if (adap)
|
||||
cec_set_edid_phys_addr(edid->edid, edid->blocks * 128, adap->phys_addr);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3184,6 +3184,7 @@ static ssize_t ehea_probe_port(struct device *dev,
|
|||
|
||||
if (ehea_add_adapter_mr(adapter)) {
|
||||
pr_err("creating MR failed\n");
|
||||
of_node_put(eth_dn);
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -547,9 +547,8 @@ static void ks8851_rx_pkts(struct ks8851_net *ks)
|
|||
/* set dma read address */
|
||||
ks8851_wrreg16(ks, KS_RXFDPR, RXFDPR_RXFPAI | 0x00);
|
||||
|
||||
/* start the packet dma process, and set auto-dequeue rx */
|
||||
ks8851_wrreg16(ks, KS_RXQCR,
|
||||
ks->rc_rxqcr | RXQCR_SDA | RXQCR_ADRFE);
|
||||
/* start DMA access */
|
||||
ks8851_wrreg16(ks, KS_RXQCR, ks->rc_rxqcr | RXQCR_SDA);
|
||||
|
||||
if (rxlen > 4) {
|
||||
unsigned int rxalign;
|
||||
|
|
@ -580,7 +579,8 @@ static void ks8851_rx_pkts(struct ks8851_net *ks)
|
|||
}
|
||||
}
|
||||
|
||||
ks8851_wrreg16(ks, KS_RXQCR, ks->rc_rxqcr);
|
||||
/* end DMA access and dequeue packet */
|
||||
ks8851_wrreg16(ks, KS_RXQCR, ks->rc_rxqcr | RXQCR_RRXEF);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -797,6 +797,15 @@ static void ks8851_tx_work(struct work_struct *work)
|
|||
static int ks8851_net_open(struct net_device *dev)
|
||||
{
|
||||
struct ks8851_net *ks = netdev_priv(dev);
|
||||
int ret;
|
||||
|
||||
ret = request_threaded_irq(dev->irq, NULL, ks8851_irq,
|
||||
IRQF_TRIGGER_LOW | IRQF_ONESHOT,
|
||||
dev->name, ks);
|
||||
if (ret < 0) {
|
||||
netdev_err(dev, "failed to get irq\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* lock the card, even if we may not actually be doing anything
|
||||
* else at the moment */
|
||||
|
|
@ -861,6 +870,7 @@ static int ks8851_net_open(struct net_device *dev)
|
|||
netif_dbg(ks, ifup, ks->netdev, "network device up\n");
|
||||
|
||||
mutex_unlock(&ks->lock);
|
||||
mii_check_link(&ks->mii);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -911,6 +921,8 @@ static int ks8851_net_stop(struct net_device *dev)
|
|||
dev_kfree_skb(txb);
|
||||
}
|
||||
|
||||
free_irq(dev->irq, ks);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -1516,6 +1528,7 @@ static int ks8851_probe(struct spi_device *spi)
|
|||
|
||||
spi_set_drvdata(spi, ks);
|
||||
|
||||
netif_carrier_off(ks->netdev);
|
||||
ndev->if_port = IF_PORT_100BASET;
|
||||
ndev->netdev_ops = &ks8851_netdev_ops;
|
||||
ndev->irq = spi->irq;
|
||||
|
|
@ -1542,14 +1555,6 @@ static int ks8851_probe(struct spi_device *spi)
|
|||
ks8851_read_selftest(ks);
|
||||
ks8851_init_mac(ks);
|
||||
|
||||
ret = request_threaded_irq(spi->irq, NULL, ks8851_irq,
|
||||
IRQF_TRIGGER_LOW | IRQF_ONESHOT,
|
||||
ndev->name, ks);
|
||||
if (ret < 0) {
|
||||
dev_err(&spi->dev, "failed to get irq\n");
|
||||
goto err_irq;
|
||||
}
|
||||
|
||||
ret = register_netdev(ndev);
|
||||
if (ret) {
|
||||
dev_err(&spi->dev, "failed to register network device\n");
|
||||
|
|
@ -1562,14 +1567,10 @@ static int ks8851_probe(struct spi_device *spi)
|
|||
|
||||
return 0;
|
||||
|
||||
|
||||
err_netdev:
|
||||
free_irq(ndev->irq, ks);
|
||||
|
||||
err_irq:
|
||||
err_id:
|
||||
if (gpio_is_valid(gpio))
|
||||
gpio_set_value(gpio, 0);
|
||||
err_id:
|
||||
regulator_disable(ks->vdd_reg);
|
||||
err_reg:
|
||||
regulator_disable(ks->vdd_io);
|
||||
|
|
@ -1587,7 +1588,6 @@ static int ks8851_remove(struct spi_device *spi)
|
|||
dev_info(&spi->dev, "remove\n");
|
||||
|
||||
unregister_netdev(priv->netdev);
|
||||
free_irq(spi->irq, priv);
|
||||
if (gpio_is_valid(priv->gpio))
|
||||
gpio_set_value(priv->gpio, 0);
|
||||
regulator_disable(priv->vdd_reg);
|
||||
|
|
|
|||
|
|
@ -1038,6 +1038,8 @@ int qlcnic_do_lb_test(struct qlcnic_adapter *adapter, u8 mode)
|
|||
|
||||
for (i = 0; i < QLCNIC_NUM_ILB_PKT; i++) {
|
||||
skb = netdev_alloc_skb(adapter->netdev, QLCNIC_ILB_PKT_SIZE);
|
||||
if (!skb)
|
||||
break;
|
||||
qlcnic_create_loopback_buff(skb->data, adapter->mac_addr);
|
||||
skb_put(skb, QLCNIC_ILB_PKT_SIZE);
|
||||
adapter->ahw->diag_cnt = 0;
|
||||
|
|
|
|||
|
|
@ -3122,12 +3122,16 @@ static int gbe_probe(struct netcp_device *netcp_device, struct device *dev,
|
|||
|
||||
ret = netcp_txpipe_init(&gbe_dev->tx_pipe, netcp_device,
|
||||
gbe_dev->dma_chan_name, gbe_dev->tx_queue_id);
|
||||
if (ret)
|
||||
if (ret) {
|
||||
of_node_put(interfaces);
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = netcp_txpipe_open(&gbe_dev->tx_pipe);
|
||||
if (ret)
|
||||
if (ret) {
|
||||
of_node_put(interfaces);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Create network interfaces */
|
||||
INIT_LIST_HEAD(&gbe_dev->gbe_intf_head);
|
||||
|
|
|
|||
|
|
@ -1548,12 +1548,14 @@ static int axienet_probe(struct platform_device *pdev)
|
|||
ret = of_address_to_resource(np, 0, &dmares);
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "unable to get DMA resource\n");
|
||||
of_node_put(np);
|
||||
goto free_netdev;
|
||||
}
|
||||
lp->dma_regs = devm_ioremap_resource(&pdev->dev, &dmares);
|
||||
if (IS_ERR(lp->dma_regs)) {
|
||||
dev_err(&pdev->dev, "could not map DMA regs\n");
|
||||
ret = PTR_ERR(lp->dma_regs);
|
||||
of_node_put(np);
|
||||
goto free_netdev;
|
||||
}
|
||||
lp->rx_irq = irq_of_parse_and_map(np, 1);
|
||||
|
|
|
|||
|
|
@ -148,6 +148,7 @@ struct ipheth_device {
|
|||
u8 bulk_in;
|
||||
u8 bulk_out;
|
||||
struct delayed_work carrier_work;
|
||||
bool confirmed_pairing;
|
||||
};
|
||||
|
||||
static int ipheth_rx_submit(struct ipheth_device *dev, gfp_t mem_flags);
|
||||
|
|
@ -259,7 +260,7 @@ static void ipheth_rcvbulk_callback(struct urb *urb)
|
|||
|
||||
dev->net->stats.rx_packets++;
|
||||
dev->net->stats.rx_bytes += len;
|
||||
|
||||
dev->confirmed_pairing = true;
|
||||
netif_rx(skb);
|
||||
ipheth_rx_submit(dev, GFP_ATOMIC);
|
||||
}
|
||||
|
|
@ -280,14 +281,24 @@ static void ipheth_sndbulk_callback(struct urb *urb)
|
|||
dev_err(&dev->intf->dev, "%s: urb status: %d\n",
|
||||
__func__, status);
|
||||
|
||||
netif_wake_queue(dev->net);
|
||||
if (status == 0)
|
||||
netif_wake_queue(dev->net);
|
||||
else
|
||||
// on URB error, trigger immediate poll
|
||||
schedule_delayed_work(&dev->carrier_work, 0);
|
||||
}
|
||||
|
||||
static int ipheth_carrier_set(struct ipheth_device *dev)
|
||||
{
|
||||
struct usb_device *udev = dev->udev;
|
||||
struct usb_device *udev;
|
||||
int retval;
|
||||
|
||||
if (!dev)
|
||||
return 0;
|
||||
if (!dev->confirmed_pairing)
|
||||
return 0;
|
||||
|
||||
udev = dev->udev;
|
||||
retval = usb_control_msg(udev,
|
||||
usb_rcvctrlpipe(udev, IPHETH_CTRL_ENDP),
|
||||
IPHETH_CMD_CARRIER_CHECK, /* request */
|
||||
|
|
@ -302,11 +313,14 @@ static int ipheth_carrier_set(struct ipheth_device *dev)
|
|||
return retval;
|
||||
}
|
||||
|
||||
if (dev->ctrl_buf[0] == IPHETH_CARRIER_ON)
|
||||
if (dev->ctrl_buf[0] == IPHETH_CARRIER_ON) {
|
||||
netif_carrier_on(dev->net);
|
||||
else
|
||||
if (dev->tx_urb->status != -EINPROGRESS)
|
||||
netif_wake_queue(dev->net);
|
||||
} else {
|
||||
netif_carrier_off(dev->net);
|
||||
|
||||
netif_stop_queue(dev->net);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -386,7 +400,6 @@ static int ipheth_open(struct net_device *net)
|
|||
return retval;
|
||||
|
||||
schedule_delayed_work(&dev->carrier_work, IPHETH_CARRIER_CHECK_TIMEOUT);
|
||||
netif_start_queue(net);
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
|
@ -489,7 +502,7 @@ static int ipheth_probe(struct usb_interface *intf,
|
|||
dev->udev = udev;
|
||||
dev->net = netdev;
|
||||
dev->intf = intf;
|
||||
|
||||
dev->confirmed_pairing = false;
|
||||
/* Set up endpoints */
|
||||
hintf = usb_altnum_to_altsetting(intf, IPHETH_ALT_INTFNUM);
|
||||
if (hintf == NULL) {
|
||||
|
|
@ -540,7 +553,9 @@ static int ipheth_probe(struct usb_interface *intf,
|
|||
retval = -EIO;
|
||||
goto err_register_netdev;
|
||||
}
|
||||
|
||||
// carrier down and transmit queues stopped until packet from device
|
||||
netif_carrier_off(netdev);
|
||||
netif_tx_stop_all_queues(netdev);
|
||||
dev_info(&intf->dev, "Apple iPhone USB Ethernet device attached\n");
|
||||
return 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -238,10 +238,6 @@ static void _zfcp_fc_incoming_rscn(struct zfcp_fsf_req *fsf_req, u32 range,
|
|||
list_for_each_entry(port, &adapter->port_list, list) {
|
||||
if ((port->d_id & range) == (ntoh24(page->rscn_fid) & range))
|
||||
zfcp_fc_test_link(port);
|
||||
if (!port->d_id)
|
||||
zfcp_erp_port_reopen(port,
|
||||
ZFCP_STATUS_COMMON_ERP_FAILED,
|
||||
"fcrscn1");
|
||||
}
|
||||
read_unlock_irqrestore(&adapter->port_list_lock, flags);
|
||||
}
|
||||
|
|
@ -249,6 +245,7 @@ static void _zfcp_fc_incoming_rscn(struct zfcp_fsf_req *fsf_req, u32 range,
|
|||
static void zfcp_fc_incoming_rscn(struct zfcp_fsf_req *fsf_req)
|
||||
{
|
||||
struct fsf_status_read_buffer *status_buffer = (void *)fsf_req->data;
|
||||
struct zfcp_adapter *adapter = fsf_req->adapter;
|
||||
struct fc_els_rscn *head;
|
||||
struct fc_els_rscn_page *page;
|
||||
u16 i;
|
||||
|
|
@ -261,6 +258,22 @@ static void zfcp_fc_incoming_rscn(struct zfcp_fsf_req *fsf_req)
|
|||
/* see FC-FS */
|
||||
no_entries = head->rscn_plen / sizeof(struct fc_els_rscn_page);
|
||||
|
||||
if (no_entries > 1) {
|
||||
/* handle failed ports */
|
||||
unsigned long flags;
|
||||
struct zfcp_port *port;
|
||||
|
||||
read_lock_irqsave(&adapter->port_list_lock, flags);
|
||||
list_for_each_entry(port, &adapter->port_list, list) {
|
||||
if (port->d_id)
|
||||
continue;
|
||||
zfcp_erp_port_reopen(port,
|
||||
ZFCP_STATUS_COMMON_ERP_FAILED,
|
||||
"fcrscn1");
|
||||
}
|
||||
read_unlock_irqrestore(&adapter->port_list_lock, flags);
|
||||
}
|
||||
|
||||
for (i = 1; i < no_entries; i++) {
|
||||
/* skip head and start with 1st element */
|
||||
page++;
|
||||
|
|
|
|||
|
|
@ -3207,6 +3207,8 @@ static int qla4xxx_conn_bind(struct iscsi_cls_session *cls_session,
|
|||
if (iscsi_conn_bind(cls_session, cls_conn, is_leading))
|
||||
return -EINVAL;
|
||||
ep = iscsi_lookup_endpoint(transport_fd);
|
||||
if (!ep)
|
||||
return -EINVAL;
|
||||
conn = cls_conn->dd_data;
|
||||
qla_conn = conn->dd_data;
|
||||
qla_conn->qla_ep = ep->dd_data;
|
||||
|
|
|
|||
|
|
@ -158,17 +158,9 @@ static u8 write_macreg_hdl(struct _adapter *padapter, u8 *pbuf)
|
|||
|
||||
static u8 read_bbreg_hdl(struct _adapter *padapter, u8 *pbuf)
|
||||
{
|
||||
u32 val;
|
||||
void (*pcmd_callback)(struct _adapter *dev, struct cmd_obj *pcmd);
|
||||
struct cmd_obj *pcmd = (struct cmd_obj *)pbuf;
|
||||
|
||||
if (pcmd->rsp && pcmd->rspsz > 0)
|
||||
memcpy(pcmd->rsp, (u8 *)&val, pcmd->rspsz);
|
||||
pcmd_callback = cmd_callback[pcmd->cmdcode].callback;
|
||||
if (!pcmd_callback)
|
||||
r8712_free_cmd_obj(pcmd);
|
||||
else
|
||||
pcmd_callback(padapter, pcmd);
|
||||
r8712_free_cmd_obj(pcmd);
|
||||
return H2C_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -152,7 +152,7 @@ enum rtl8712_h2c_cmd {
|
|||
static struct _cmd_callback cmd_callback[] = {
|
||||
{GEN_CMD_CODE(_Read_MACREG), NULL}, /*0*/
|
||||
{GEN_CMD_CODE(_Write_MACREG), NULL},
|
||||
{GEN_CMD_CODE(_Read_BBREG), &r8712_getbbrfreg_cmdrsp_callback},
|
||||
{GEN_CMD_CODE(_Read_BBREG), NULL},
|
||||
{GEN_CMD_CODE(_Write_BBREG), NULL},
|
||||
{GEN_CMD_CODE(_Read_RFREG), &r8712_getbbrfreg_cmdrsp_callback},
|
||||
{GEN_CMD_CODE(_Write_RFREG), NULL}, /*5*/
|
||||
|
|
|
|||
|
|
@ -52,11 +52,6 @@ struct ar933x_uart_port {
|
|||
struct clk *clk;
|
||||
};
|
||||
|
||||
static inline bool ar933x_uart_console_enabled(void)
|
||||
{
|
||||
return IS_ENABLED(CONFIG_SERIAL_AR933X_CONSOLE);
|
||||
}
|
||||
|
||||
static inline unsigned int ar933x_uart_read(struct ar933x_uart_port *up,
|
||||
int offset)
|
||||
{
|
||||
|
|
@ -511,6 +506,7 @@ static struct uart_ops ar933x_uart_ops = {
|
|||
.verify_port = ar933x_uart_verify_port,
|
||||
};
|
||||
|
||||
#ifdef CONFIG_SERIAL_AR933X_CONSOLE
|
||||
static struct ar933x_uart_port *
|
||||
ar933x_console_ports[CONFIG_SERIAL_AR933X_NR_UARTS];
|
||||
|
||||
|
|
@ -607,14 +603,7 @@ static struct console ar933x_uart_console = {
|
|||
.index = -1,
|
||||
.data = &ar933x_uart_driver,
|
||||
};
|
||||
|
||||
static void ar933x_uart_add_console_port(struct ar933x_uart_port *up)
|
||||
{
|
||||
if (!ar933x_uart_console_enabled())
|
||||
return;
|
||||
|
||||
ar933x_console_ports[up->port.line] = up;
|
||||
}
|
||||
#endif /* CONFIG_SERIAL_AR933X_CONSOLE */
|
||||
|
||||
static struct uart_driver ar933x_uart_driver = {
|
||||
.owner = THIS_MODULE,
|
||||
|
|
@ -703,7 +692,9 @@ static int ar933x_uart_probe(struct platform_device *pdev)
|
|||
baud = ar933x_uart_get_baud(port->uartclk, 0, AR933X_UART_MAX_STEP);
|
||||
up->max_baud = min_t(unsigned int, baud, AR933X_UART_MAX_BAUD);
|
||||
|
||||
ar933x_uart_add_console_port(up);
|
||||
#ifdef CONFIG_SERIAL_AR933X_CONSOLE
|
||||
ar933x_console_ports[up->port.line] = up;
|
||||
#endif
|
||||
|
||||
ret = uart_add_one_port(&ar933x_uart_driver, &up->port);
|
||||
if (ret)
|
||||
|
|
@ -752,8 +743,9 @@ static int __init ar933x_uart_init(void)
|
|||
{
|
||||
int ret;
|
||||
|
||||
if (ar933x_uart_console_enabled())
|
||||
ar933x_uart_driver.cons = &ar933x_uart_console;
|
||||
#ifdef CONFIG_SERIAL_AR933X_CONSOLE
|
||||
ar933x_uart_driver.cons = &ar933x_uart_console;
|
||||
#endif
|
||||
|
||||
ret = uart_register_driver(&ar933x_uart_driver);
|
||||
if (ret)
|
||||
|
|
|
|||
|
|
@ -1482,7 +1482,7 @@ static int __init sc16is7xx_init(void)
|
|||
ret = i2c_add_driver(&sc16is7xx_i2c_uart_driver);
|
||||
if (ret < 0) {
|
||||
pr_err("failed to init sc16is7xx i2c --> %d\n", ret);
|
||||
return ret;
|
||||
goto err_i2c;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
@ -1490,10 +1490,18 @@ static int __init sc16is7xx_init(void)
|
|||
ret = spi_register_driver(&sc16is7xx_spi_uart_driver);
|
||||
if (ret < 0) {
|
||||
pr_err("failed to init sc16is7xx spi --> %d\n", ret);
|
||||
return ret;
|
||||
goto err_spi;
|
||||
}
|
||||
#endif
|
||||
return ret;
|
||||
|
||||
err_spi:
|
||||
#ifdef CONFIG_SERIAL_SC16IS7XX_I2C
|
||||
i2c_del_driver(&sc16is7xx_i2c_uart_driver);
|
||||
#endif
|
||||
err_i2c:
|
||||
uart_unregister_driver(&sc16is7xx_uart);
|
||||
return ret;
|
||||
}
|
||||
module_init(sc16is7xx_init);
|
||||
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue