Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit da8bacf6 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband

* 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband:
  IB/ipath: deref correct pointer when using kernel SMA
  IB/ipath: fix null deref during rdma ops
  IB/ipath: register as IB device owner
  IB/ipath: enable PE800 receive interrupts on user ports
  IB/ipath: enable GPIO interrupt on HT-460
  IB/ipath: fix NULL dereference during cleanup
  IB/ipath: replace uses of LIST_POISON
  IB/ipath: fix reporting of driver version to userspace
  IB/ipath: don't modify QP if changes fail
  IB/ipath: fix spinlock recursion bug
parents 67e38124 09b74de9
Loading
Loading
Loading
Loading
+11 −11
Original line number Diff line number Diff line
@@ -1905,19 +1905,19 @@ static void __exit infinipath_cleanup(void)
			} else
				ipath_dbg("irq is 0, not doing free_irq "
					  "for unit %u\n", dd->ipath_unit);
			dd->pcidev = NULL;
		}

			/*
		 * we check for NULL here, because it's outside the kregbase
		 * check, and we need to call it after the free_irq.  Thus
		 * it's possible that the function pointers were never
		 * initialized.
			 * we check for NULL here, because it's outside
			 * the kregbase check, and we need to call it
			 * after the free_irq.  Thus it's possible that
			 * the function pointers were never initialized.
			 */
			if (dd->ipath_f_cleanup)
				/* clean up chip-specific stuff */
				dd->ipath_f_cleanup(dd);

			dd->pcidev = NULL;
		}
		spin_lock_irqsave(&ipath_devs_lock, flags);
	}

+3 −4
Original line number Diff line number Diff line
@@ -505,11 +505,10 @@ static u8 flash_csum(struct ipath_flash *ifp, int adjust)
 * ipath_get_guid - get the GUID from the i2c device
 * @dd: the infinipath device
 *
 * When we add the multi-chip support, we will probably have to add
 * the ability to use the number of guids field, and get the guid from
 * the first chip's flash, to use for all of them.
 * We have the capability to use the ipath_nguid field, and get
 * the guid from the first chip's flash, to use for all of them.
 */
void ipath_get_guid(struct ipath_devdata *dd)
void ipath_get_eeprom_info(struct ipath_devdata *dd)
{
	void *buf;
	struct ipath_flash *ifp;
+5 −1
Original line number Diff line number Diff line
@@ -139,7 +139,7 @@ static int ipath_get_base_info(struct ipath_portdata *pd,
	kinfo->spi_piosize = dd->ipath_ibmaxlen;
	kinfo->spi_mtu = dd->ipath_ibmaxlen;	/* maxlen, not ibmtu */
	kinfo->spi_port = pd->port_port;
	kinfo->spi_sw_version = IPATH_USER_SWVERSION;
	kinfo->spi_sw_version = IPATH_KERN_SWVERSION;
	kinfo->spi_hw_version = dd->ipath_revision;

	if (copy_to_user(ubase, kinfo, sizeof(*kinfo)))
@@ -1224,6 +1224,10 @@ static unsigned int ipath_poll(struct file *fp,

	if (tail == head) {
		set_bit(IPATH_PORT_WAITING_RCV, &pd->port_flag);
		if(dd->ipath_rhdrhead_intr_off) /* arm rcv interrupt */
			(void)ipath_write_ureg(dd, ur_rcvhdrhead,
					       dd->ipath_rhdrhead_intr_off
					       | head, pd->port_port);
		poll_wait(fp, &pd->port_wait, pt);

		if (test_bit(IPATH_PORT_WAITING_RCV, &pd->port_flag)) {
+19 −2
Original line number Diff line number Diff line
@@ -607,7 +607,12 @@ static int ipath_ht_boardname(struct ipath_devdata *dd, char *name,
	case 4:		/* Ponderosa is one of the bringup boards */
		n = "Ponderosa";
		break;
	case 5:		/* HT-460 original production board */
	case 5:
		/*
		 * HT-460 original production board; two production levels, with
		 * different serial number ranges.   See ipath_ht_early_init() for
		 * case where we enable IPATH_GPIO_INTR for later serial # range.
		 */
		n = "InfiniPath_HT-460";
		break;
	case 6:
@@ -642,7 +647,7 @@ static int ipath_ht_boardname(struct ipath_devdata *dd, char *name,
	if (n)
		snprintf(name, namelen, "%s", n);

	if (dd->ipath_majrev != 3 || dd->ipath_minrev != 2) {
	if (dd->ipath_majrev != 3 || (dd->ipath_minrev < 2 || dd->ipath_minrev > 3)) {
		/*
		 * This version of the driver only supports the HT-400
		 * Rev 3.2
@@ -1520,6 +1525,18 @@ static int ipath_ht_early_init(struct ipath_devdata *dd)
	 */
	ipath_write_kreg(dd, dd->ipath_kregs->kr_sendctrl,
			 INFINIPATH_S_ABORT);

	ipath_get_eeprom_info(dd);
	if(dd->ipath_boardrev == 5 && dd->ipath_serial[0] == '1' &&
		dd->ipath_serial[1] == '2' && dd->ipath_serial[2] == '8') {
		/*
		 * Later production HT-460 has same changes as HT-465, so
		 * can use GPIO interrupts.  They have serial #'s starting
		 * with 128, rather than 112.
		 */
		dd->ipath_flags |= IPATH_GPIO_INTR;
		dd->ipath_flags &= ~IPATH_POLL_RX_INTR;
	}
	return 0;
}

+0 −1
Original line number Diff line number Diff line
@@ -879,7 +879,6 @@ int ipath_init_chip(struct ipath_devdata *dd, int reinit)

done:
	if (!ret) {
		ipath_get_guid(dd);
		*dd->ipath_statusp |= IPATH_STATUS_CHIP_PRESENT;
		if (!dd->ipath_f_intrsetup(dd)) {
			/* now we can enable all interrupts from the chip */
Loading